summaryrefslogtreecommitdiff
path: root/upb/def.c
diff options
context:
space:
mode:
Diffstat (limited to 'upb/def.c')
-rw-r--r--upb/def.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/upb/def.c b/upb/def.c
index 4423053..b3114cd 100644
--- a/upb/def.c
+++ b/upb/def.c
@@ -1337,6 +1337,7 @@ bool upb_fielddef_checkdescriptortype(int32_t type) {
/* upb_msgdef *****************************************************************/
+static const char *kDurationFullMessageName = "google.protobuf.Duration";
static const char *kTimestampFullMessageName = "google.protobuf.Timestamp";
static void visitmsg(const upb_refcounted *r, upb_refcounted_visit *visit,
@@ -1595,6 +1596,10 @@ bool upb_msgdef_mapentry(const upb_msgdef *m) {
return m->map_entry;
}
+bool upb_msgdef_duration(const upb_msgdef *m) {
+ return strcmp(upb_msgdef_fullname(m), kDurationFullMessageName) == 0;
+}
+
bool upb_msgdef_timestamp(const upb_msgdef *m) {
return strcmp(upb_msgdef_fullname(m), kTimestampFullMessageName) == 0;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback