Add void_obj option
This commit is contained in:
@ -51,6 +51,8 @@ typedef void (*refcount_destroy_callback_t)(void *obj, void *user_data);
|
||||
*/
|
||||
typedef struct RefcountContext {
|
||||
size_t entry_offset; //!< Offset to the #RefcountEntry member.
|
||||
void *void_val; //!< Value returned by #refcount_context_unref when a
|
||||
//!< reference count falls to 0.
|
||||
refcount_held_refs_callback_t
|
||||
held_refs_callback; //!< Callback to list an object's held references.
|
||||
refcount_destroy_callback_t
|
||||
@ -75,7 +77,7 @@ typedef struct RefcountContext {
|
||||
extern RefcountContext *refcount_default_context;
|
||||
|
||||
RefcountContext *
|
||||
refcount_make_context(size_t entry_offset,
|
||||
refcount_make_context(size_t entry_offset, void *void_val,
|
||||
refcount_held_refs_callback_t held_refs_callback,
|
||||
refcount_destroy_callback_t destroy_callback,
|
||||
void *user_data, const RefcountAllocator *alloc);
|
||||
|
Reference in New Issue
Block a user