git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@59042
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
/** Used when removing a reference to an object. Free_Callback will automatically be called when necessary */
#define EINA_REFCOUNT_UNREF(Variable, Free_Callback) \
- if (--((Variable)->__refcount) == 0) \
- Free_Callback(Variable);
+ do \
+ { \
+ if (--((Variable)->__refcount) == 0) \
+ Free_Callback(Variable); \
+ } \
+ while (0)
/** Get refcounting value */
#define EINA_REFCOUNT_GET(Variable) (Variable)->__refcount