diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-02-25 18:31:22 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-02-25 18:31:22 -0800 |
commit | a75a305c77acd6800b81204f387f7a437a62fe6b (patch) | |
tree | dbd83530befface0868b7fdca37769590b61d5ed /src/upb_textprinter.c | |
parent | abfc897b50532e5ed64f7f5497f80ef56abd3b26 (diff) |
Implemented upb_stringsink, upb_msgtotext, and exposed the latter to Lua.
Diffstat (limited to 'src/upb_textprinter.c')
-rw-r--r-- | src/upb_textprinter.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/upb_textprinter.c b/src/upb_textprinter.c index c0fb944..7e99ebd 100644 --- a/src/upb_textprinter.c +++ b/src/upb_textprinter.c @@ -20,8 +20,7 @@ struct _upb_textprinter { #define CHECK(x) if ((x) < 0) goto err; -static int upb_textprinter_indent(upb_textprinter *p) -{ +static int upb_textprinter_indent(upb_textprinter *p) { if(!p->single_line) for(int i = 0; i < p->indent_depth; i++) CHECK(upb_bytesink_putstr(p->bytesink, UPB_STRLIT(" "), &p->status)); @@ -107,8 +106,7 @@ err: return UPB_BREAK; } -static upb_flow_t upb_textprinter_endsubmsg(void *_p, upb_fielddef *f) -{ +static upb_flow_t upb_textprinter_endsubmsg(void *_p, upb_fielddef *f) { (void)f; upb_textprinter *p = _p; p->indent_depth--; |