summaryrefslogtreecommitdiff
path: root/core/upb_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/upb_stream.c')
-rw-r--r--core/upb_stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/upb_stream.c b/core/upb_stream.c
index e0863b8..bda11de 100644
--- a/core/upb_stream.c
+++ b/core/upb_stream.c
@@ -16,10 +16,10 @@ void upb_streamdata(upb_src *src, upb_sink *sink, upb_status *status) {
upb_string *str = NULL;
while((f = upb_src_getdef(src)) != NULL) {
CHECKSINK(upb_sink_putdef(sink, f));
- if(f->type == UPB_TYPE(GROUP) || f->type == UPB_TYPE(MESSAGE)) {
+ if(upb_issubmsg(f)) {
// We always recurse into submessages, but the putdef above already told
// the sink that.
- } else if(f->type == UPB_TYPE(STRING) || f->type == UPB_TYPE(BYTES)) {
+ } else if(upb_isstring(f)) {
str = upb_string_tryrecycle(str);
CHECKSRC(upb_src_getstr(src, str));
CHECKSINK(upb_sink_putstr(sink, str));
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback