From a503b8859c37906ab5012db163daca43bfe393bb Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 21 May 2011 17:35:21 -0700 Subject: 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 --- src/upb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/upb.h') 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); -- cgit v1.2.3