diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-05-21 17:35:21 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-05-21 17:35:21 -0700 |
commit | a503b8859c37906ab5012db163daca43bfe393bb (patch) | |
tree | babc144389856dbe29bacb48bdbe267b9a48e5b8 /src/upb.h | |
parent | 2ccebb74c309c7ea4c4589b35893cdd6c996ac4b (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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |