cbdataFree

From: Robert Collins <robert.collins@dont-contact.us>
Date: Mon, 7 May 2001 22:31:33 +1000

This macro:

#define cbdataFree(var) (var = (var != NULL ? cbdataInternalFree(var):
NULL))

is a problem for me:
I'm build a refcounted structure.
the cbdata code has provision to allow the following sequence:

CBDATA_INIT_TYPE_FREECB(footype, freefoo)

foo=cbdataAlloc(footype);
cbdataLock(foo);
cbdataFree(foo);

access, lock and unlock foo until a matching
cbdataUnlock(foo);
occurs and then freefoo(foo) is automatically called.

However the above macro is setting foo to NULL !? (because
cbdataInternalFree is returning NULL).

Is this by design or oversite?

Rob
Received on Mon May 07 2001 - 06:33:53 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:00 MST