forked from enlightenment/efl
Eobj: Fixed the order of parameters in the weak ref add func.
SVN revision: 70430
This commit is contained in:
parent
b9ed47a471
commit
b004b4c833
|
@ -543,8 +543,8 @@ EAPI void eobj_del(Eobj *obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add a new weak reference to obj.
|
* @brief Add a new weak reference to obj.
|
||||||
* @param obj The object being referenced.
|
|
||||||
* @param wref The pointer to use for the weak ref.
|
* @param wref The pointer to use for the weak ref.
|
||||||
|
* @param obj The object being referenced.
|
||||||
* @return The object being referenced (obj).
|
* @return The object being referenced (obj).
|
||||||
*
|
*
|
||||||
* This function registers the object handle pointed by wref to obj so when
|
* This function registers the object handle pointed by wref to obj so when
|
||||||
|
@ -554,7 +554,7 @@ EAPI void eobj_del(Eobj *obj);
|
||||||
*
|
*
|
||||||
* @see eobj_weak_ref_del()
|
* @see eobj_weak_ref_del()
|
||||||
*/
|
*/
|
||||||
EAPI Eobj *eobj_weak_ref_add(const Eobj *obj, Eobj **wref);
|
EAPI Eobj *eobj_weak_ref_add(Eobj **wref, const Eobj *obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Delete the weak reference passed.
|
* @brief Delete the weak reference passed.
|
||||||
|
|
|
@ -1090,7 +1090,7 @@ _eobj_weak_ref_cb(void *data, Eobj *obj EINA_UNUSED, const Eobj_Event_Descriptio
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eobj *
|
EAPI Eobj *
|
||||||
eobj_weak_ref_add(const Eobj *_obj, Eobj **wref)
|
eobj_weak_ref_add(Eobj **wref, const Eobj *_obj)
|
||||||
{
|
{
|
||||||
Eobj *obj = (Eobj *) _obj;
|
Eobj *obj = (Eobj *) _obj;
|
||||||
EOBJ_MAGIC_RETURN_VAL(obj, EOBJ_EINA_MAGIC, obj);
|
EOBJ_MAGIC_RETURN_VAL(obj, EOBJ_EINA_MAGIC, obj);
|
||||||
|
|
|
@ -70,7 +70,7 @@ START_TEST(eobj_weak_reference)
|
||||||
|
|
||||||
Eobj *obj = eobj_add(SIMPLE_CLASS, NULL);
|
Eobj *obj = eobj_add(SIMPLE_CLASS, NULL);
|
||||||
Eobj *wref;
|
Eobj *wref;
|
||||||
eobj_weak_ref_add(obj, &wref);
|
eobj_weak_ref_add(&wref, obj);
|
||||||
fail_if(!wref);
|
fail_if(!wref);
|
||||||
|
|
||||||
eobj_unref(obj);
|
eobj_unref(obj);
|
||||||
|
@ -79,7 +79,7 @@ START_TEST(eobj_weak_reference)
|
||||||
eobj_weak_ref_del(&wref);
|
eobj_weak_ref_del(&wref);
|
||||||
|
|
||||||
obj = eobj_add(SIMPLE_CLASS, NULL);
|
obj = eobj_add(SIMPLE_CLASS, NULL);
|
||||||
eobj_weak_ref_add(obj, &wref);
|
eobj_weak_ref_add(&wref, obj);
|
||||||
|
|
||||||
eobj_ref(obj);
|
eobj_ref(obj);
|
||||||
fail_if(!wref);
|
fail_if(!wref);
|
||||||
|
@ -94,7 +94,7 @@ START_TEST(eobj_weak_reference)
|
||||||
|
|
||||||
obj = eobj_add(SIMPLE_CLASS, NULL);
|
obj = eobj_add(SIMPLE_CLASS, NULL);
|
||||||
|
|
||||||
eobj_weak_ref_add(obj, &wref);
|
eobj_weak_ref_add(&wref, obj);
|
||||||
eobj_weak_ref_del(&wref);
|
eobj_weak_ref_del(&wref);
|
||||||
|
|
||||||
eobj_unref(obj);
|
eobj_unref(obj);
|
||||||
|
@ -277,7 +277,7 @@ START_TEST(eobj_magic_checks)
|
||||||
fail_if(0 != eobj_ref_get((Eobj *) buf));
|
fail_if(0 != eobj_ref_get((Eobj *) buf));
|
||||||
|
|
||||||
Eobj *wref = NULL;
|
Eobj *wref = NULL;
|
||||||
eobj_weak_ref_add((Eobj *) buf, &wref);
|
eobj_weak_ref_add(&wref, (Eobj *) buf);
|
||||||
fail_if(wref);
|
fail_if(wref);
|
||||||
eobj_weak_ref_del(&wref);
|
eobj_weak_ref_del(&wref);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue