diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-06-28 09:31:46 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-06-28 09:31:46 -0700 |
commit | 2da3b081c47fe8fe7476da228323d2040e876f56 (patch) | |
tree | f402f516d30be67dd3713477862c5248b8a882a2 /upb.h | |
parent | 3a67a1e9f95535adbc67f42771789cd83443a377 (diff) |
More work on upb_context.
Diffstat (limited to 'upb.h')
-rw-r--r-- | upb.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -29,6 +29,9 @@ extern "C" { /* The maximum that any submessages can be nested. Matches proto2's limit. */ #define UPB_MAX_NESTING 64 +/* The maximum number of fields that any one .proto type can have. */ +#define UPB_MAX_FIELDS (1<<16) + /* Represents a string or bytes. */ struct upb_string { /* We expect the data to be 8-bit clean (uint8_t), but char* is such an @@ -97,6 +100,19 @@ struct upb_tag { upb_wire_type_t wire_type; }; +enum upb_symbol_type { + UPB_SYM_MESSAGE, + UPB_SYM_ENUM, + UPB_SYM_SERVICE, + UPB_SYM_EXTENSION +}; + +union upb_symbol_ref { + struct upb_msg *msg; + struct upb_enum *_enum; + struct upb_svc *svc; +}; + /* Status codes used as a return value. */ typedef enum upb_status { UPB_STATUS_OK = 0, |