eina: update Eina_Refcount API to please Tasn.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 22 Jun 2011 14:04:09 +0000 (14:04 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 22 Jun 2011 14:04:09 +0000 (14:04 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@60592 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/include/eina_refcount.h

index db4a117..f8cb36e 100644 (file)
@@ -60,14 +60,9 @@ typedef int Eina_Refcount;
 /** Used when using referring to an object one more time */
 #define EINA_REFCOUNT_REF(Variable) (Variable)->__refcount++
 
-/** Used when removing a reference to an object. Free_Callback will automatically be called when necessary */
-#define EINA_REFCOUNT_UNREF(Variable, Free_Callback) \
-   do                                                \
-     {                                               \
-        if (--((Variable)->__refcount) == 0)         \
-           Free_Callback(Variable);                  \
-     }                                               \
-   while (0)
+/** Used when removing a reference to an object. The code just after will automatically be called when necessary */
+#define EINA_REFCOUNT_UNREF(Variable)               \
+  if (--((Variable)->__refcount) == 0)
 
 /** Get refcounting value */
 #define EINA_REFCOUNT_GET(Variable) (Variable)->__refcount