diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-07-22 19:49:53 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-07-22 19:49:53 -0700 |
commit | ee1ed1ccb87effa403dc91603d452d4c98ed716f (patch) | |
tree | e1ee8c1b38d9351d4d3494c5e45b91b288f3a081 /src/upb_text.c | |
parent | e4e89247e5f7548b5ebdb9a667657cdcb3feb17f (diff) |
Compiler finally works (except string arrays). Untested. Holy crap that was a lot of work.
Diffstat (limited to 'src/upb_text.c')
-rw-r--r-- | src/upb_text.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/upb_text.c b/src/upb_text.c index d51db06..7ca17cc 100644 --- a/src/upb_text.c +++ b/src/upb_text.c @@ -8,9 +8,9 @@ #include "upb_text.h" #include "descriptor.h" -void upb_text_printval(upb_field_type_t type, union upb_value_ptr p, FILE *file) +void upb_text_printval(upb_field_type_t type, union upb_value val, FILE *file) { -#define CASE(fmtstr, member) fprintf(file, fmtstr, *p.member); break; +#define CASE(fmtstr, member) fprintf(file, fmtstr, val.member); break; switch(type) { case GOOGLE_PROTOBUF_FIELDDESCRIPTORPROTO_TYPE_DOUBLE: CASE("%0.f", _double); @@ -36,7 +36,7 @@ void upb_text_printval(upb_field_type_t type, union upb_value_ptr p, FILE *file) case GOOGLE_PROTOBUF_FIELDDESCRIPTORPROTO_TYPE_STRING: case GOOGLE_PROTOBUF_FIELDDESCRIPTORPROTO_TYPE_BYTES: /* TODO: escaping. */ - fprintf(file, "\"" UPB_STRFMT "\"", UPB_STRARG(**p.str)); break; + fprintf(file, "\"" UPB_STRFMT "\"", UPB_STRARG(*val.str)); break; } } @@ -49,7 +49,7 @@ static void print_indent(struct upb_text_printer *p, FILE *stream) void upb_text_printfield(struct upb_text_printer *p, struct upb_string name, - upb_field_type_t valtype, union upb_value_ptr val, + upb_field_type_t valtype, union upb_value val, FILE *stream) { print_indent(p, stream); |