summaryrefslogtreecommitdiff
path: root/upb/refcounted.h
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2014-07-29 16:12:53 -0700
committerJosh Haberman <jhaberman@gmail.com>2014-07-29 16:12:53 -0700
commit43f2455cbda22c513f2885d760ca2766b23e100f (patch)
tree3068031b1f5cc16e530ad25408a3c5a7554a7a28 /upb/refcounted.h
parentd493500abc6def6b62d664990ed821e0a836a6cf (diff)
Added UPB_UNTRACKED_REF and some more handler overload options.
Diffstat (limited to 'upb/refcounted.h')
-rw-r--r--upb/refcounted.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/upb/refcounted.h b/upb/refcounted.h
index ab56e4d..42251b1 100644
--- a/upb/refcounted.h
+++ b/upb/refcounted.h
@@ -89,6 +89,12 @@ UPB_DEFINE_STRUCT0(upb_refcounted,
UPB_BEGIN_EXTERN_C // {
+// It is better to use tracked refs when possible, for the extra debugging
+// capability. But if this is not possible (because you don't have easy access
+// to a stable pointer value that is associated with the ref), you can pass
+// UPB_UNTRACKED_REF instead.
+extern const void *UPB_UNTRACKED_REF;
+
// Native C API.
bool upb_refcounted_isfrozen(const upb_refcounted *r);
void upb_refcounted_ref(const upb_refcounted *r, const void *owner);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback