eina: update Eina_Refcount API to please Tasn.
SVN revision: 60592
This commit is contained in:
parent
01221a32b0
commit
563fbf97f2
|
@ -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
|
||||
|
|
|
@ -345,7 +345,8 @@ _ethumb_async_delete(void *data)
|
|||
|
||||
ethumb_free(async->dup);
|
||||
|
||||
EINA_REFCOUNT_UNREF(async->source, _ethumb_client_free);
|
||||
EINA_REFCOUNT_UNREF(async->source)
|
||||
_ethumb_client_free(async->source);
|
||||
|
||||
free(async);
|
||||
}
|
||||
|
@ -812,7 +813,8 @@ ethumb_client_disconnect(Ethumb_Client *client)
|
|||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(client);
|
||||
|
||||
EINA_REFCOUNT_UNREF(client, _ethumb_client_free);
|
||||
EINA_REFCOUNT_UNREF(client)
|
||||
_ethumb_client_free(client);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2205,7 +2207,8 @@ ethumb_client_thumb_exists_cancel(Ethumb_Exists *exists, Ethumb_Client_Thumb_Exi
|
|||
break;
|
||||
}
|
||||
|
||||
EINA_REFCOUNT_UNREF(async, _ethumb_async_cancel);
|
||||
EINA_REFCOUNT_UNREF(async)
|
||||
_ethumb_async_cancel(async);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue