From 43f2455cbda22c513f2885d760ca2766b23e100f Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Tue, 29 Jul 2014 16:12:53 -0700 Subject: Added UPB_UNTRACKED_REF and some more handler overload options. --- upb/refcounted.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'upb/refcounted.h') 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); -- cgit v1.2.3