summaryrefslogtreecommitdiff
path: root/upb/msg.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-12-15 16:17:48 -0800
committerJoshua Haberman <jhaberman@gmail.com>2018-12-15 16:17:48 -0800
commit380558922b661499f4eb43b0463b5a73e5fe87b7 (patch)
treea4784816965ae37e72bde3983c68738d7b0d41a4 /upb/msg.h
parent2681a17513be312d1da924a1644f040eb8c1372a (diff)
test_encoder passes! Other tests still need to be fixed.
Diffstat (limited to 'upb/msg.h')
-rw-r--r--upb/msg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/upb/msg.h b/upb/msg.h
index 6002b41..6061470 100644
--- a/upb/msg.h
+++ b/upb/msg.h
@@ -98,6 +98,9 @@ UPB_INLINE bool upb_stringview_eql(upb_stringview a, upb_stringview b) {
return a.size == b.size && memcmp(a.data, b.data, a.size) == 0;
}
+#define UPB_STRINGVIEW_FORMAT "%.*s"
+#define UPB_STRINGVIEW_ARGS(view) view.size, view.data
+
#define UPB_STRINGVIEW_INIT(ptr, len) {ptr, len}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback