From a75a305c77acd6800b81204f387f7a437a62fe6b Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 25 Feb 2011 18:31:22 -0800 Subject: Implemented upb_stringsink, upb_msgtotext, and exposed the latter to Lua. --- src/upb_textprinter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/upb_textprinter.c') 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--; -- cgit v1.2.3