summaryrefslogtreecommitdiff
path: root/src/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2011-05-21 17:35:21 -0700
committerJoshua Haberman <joshua@reverberate.org>2011-05-21 17:35:21 -0700
commita503b8859c37906ab5012db163daca43bfe393bb (patch)
treebabc144389856dbe29bacb48bdbe267b9a48e5b8 /src/upb.h
parent2ccebb74c309c7ea4c4589b35893cdd6c996ac4b (diff)
Make all handlers objects refcounted.
I'm realizing that basically all upb objects will need to be refcounted to be sharable across languages, but *not* messages which are on their way out so we can get out of the business of data representations. Things which must be refcounted: - encoders, decoders - handlers objects - defs
Diffstat (limited to 'src/upb.h')
-rw-r--r--src/upb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/upb.h b/src/upb.h
index 3a9dd61..d3e7b34 100644
--- a/src/upb.h
+++ b/src/upb.h
@@ -162,7 +162,7 @@ typedef struct {
upb_bytesrc *bytesrc;
upb_msg *msg;
upb_array *arr;
- upb_atomic_refcount_t *refcount;
+ upb_atomic_t *refcount;
upb_fielddef *fielddef;
void *_void;
} val;
@@ -204,7 +204,7 @@ UPB_VALUE_ACCESSORS(fielddef, fielddef, upb_fielddef*, UPB_VALUETYPE_FIELDDEF);
extern upb_value UPB_NO_VALUE;
-INLINE upb_atomic_refcount_t *upb_value_getrefcount(upb_value val) {
+INLINE upb_atomic_t *upb_value_getrefcount(upb_value val) {
assert(val.type == UPB_TYPE(MESSAGE) ||
val.type == UPB_TYPE(STRING) ||
val.type == UPB_VALUETYPE_ARRAY);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback