summaryrefslogtreecommitdiff
path: root/src/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2011-05-08 13:05:12 -0700
committerJoshua Haberman <jhaberman@gmail.com>2011-05-08 13:05:12 -0700
commitf74534b42ac9ac8b0ff496cb0da83f1201bbf8da (patch)
treecf20bb7160a6f37cecd5c2cb4222c03b88e4fcde /src/upb.h
parent4a99abba123fc1d2bef62778846a1f27b2012de0 (diff)
Decoder redesign in preparation for packed fields and start/endseq.
Diffstat (limited to 'src/upb.h')
-rw-r--r--src/upb.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/upb.h b/src/upb.h
index 38808ac..9253748 100644
--- a/src/upb.h
+++ b/src/upb.h
@@ -126,7 +126,6 @@ typedef struct {
uint8_t align;
uint8_t size;
upb_wire_type_t native_wire_type;
- uint8_t allowed_wire_types; // For packable fields, also allows delimited.
uint8_t inmemory_type; // For example, INT32, SINT32, and SFIXED32 -> INT32
char *ctype;
} upb_type_info;
@@ -168,11 +167,11 @@ typedef int32_t upb_strlen_t;
// The type of a upb_value. This is like a upb_fieldtype_t, but adds the
// constant UPB_VALUETYPE_ARRAY to represent an array.
typedef uint8_t upb_valuetype_t;
+#define UPB_TYPE_ENDGROUP 19 // Need to increase if more real types are added!
#define UPB_VALUETYPE_ARRAY 32
#define UPB_VALUETYPE_BYTESRC 32
#define UPB_VALUETYPE_RAW 33
#define UPB_VALUETYPE_FIELDDEF 34
-#define UPB_TYPE_ENDGROUP 35
// A single .proto value. The owner must have an out-of-band way of knowing
// the type, so that it knows which union member to use.
@@ -231,11 +230,6 @@ UPB_VALUE_ACCESSORS(fielddef, fielddef, upb_fielddef*, UPB_VALUETYPE_FIELDDEF);
extern upb_value UPB_NO_VALUE;
-INLINE void upb_value_setraw(upb_value *val, uint64_t cval) {
- SET_TYPE(val->type, UPB_VALUETYPE_RAW);
- val->val.uint64 = cval;
-}
-
INLINE upb_atomic_refcount_t *upb_value_getrefcount(upb_value val) {
assert(val.type == UPB_TYPE(MESSAGE) ||
val.type == UPB_TYPE(STRING) ||
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback