The data class should be specified for debug purposes.
Also, this fixes invalid uses inside the smart object
implementation where it assumed that the smart data was part
of the eo data. It may not (legacy objects).
priv->pan_obj = efl_add(MY_PAN_CLASS, evas_object_evas_get(obj));
pan_data = efl_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
- efl_data_ref(obj, NULL);
+ efl_data_ref(obj, MY_CLASS);
pan_data->wobj = obj;
pan_data->wsd = priv;
priv->pan_obj = efl_add(MY_PAN_CLASS, evas_object_evas_get(obj));
pan_data = efl_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
- efl_data_ref(obj, NULL);
+ efl_data_ref(obj, MY_CLASS);
pan_data->wobj = obj;
pan_data->wsd = priv;
priv->pan_obj = efl_add(MY_PAN_CLASS, evas_object_evas_get(obj));
pan_data = efl_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
- efl_data_ref(obj, NULL);
+ efl_data_ref(obj, MY_CLASS);
pan_data->wobj = obj;
pan_data->wsd = priv;
priv->pan_obj = efl_add(MY_PAN_CLASS, evas_object_evas_get(obj));
pan_data = efl_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
- efl_data_ref(obj, NULL);
+ efl_data_ref(obj, MY_CLASS);
pan_data->wobj = obj;
pan_data->wsd = priv;
sd->thumb.retry = EINA_TRUE;
retry = eina_list_append(retry, sd);
- efl_data_ref(sd->obj, NULL);
+ efl_data_ref(sd->obj, MY_CLASS);
return;
}
}
sd->thumb.retry = EINA_TRUE;
retry = eina_list_append(retry, sd);
- efl_data_ref(sd->obj, NULL);
+ efl_data_ref(sd->obj, MY_CLASS);
return;
}
lay->layer = obj->cur->layer;
evas_layer_add(lay);
}
- efl_data_ref(eo_obj, NULL);
+ efl_data_ref(eo_obj, EFL_CANVAS_OBJECT_CLASS);
lay->objects = (Evas_Object_Protected_Data *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj));
lay->usage++;
obj->layer = lay;
}
/* private methods for smart objects */
-static void evas_object_smart_init(Evas_Object *eo_obj);
+static inline void evas_object_smart_init(Evas_Object *eo_obj);
static void evas_object_smart_render(Evas_Object *eo_obj,
Evas_Object_Protected_Data *obj,
void *type_private_data,
evas_object_smart_data_set(Evas_Object *eo_obj, void *data)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
- if (o->data) efl_data_unref(eo_obj, o->data);
o->data = data;
- efl_data_ref(eo_obj, NULL);
}
EAPI void *
obj->smart.parent_data = o;
obj->smart.parent_object_data = smart;
o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj));
- efl_data_ref(eo_obj, NULL);
evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE,
EINA_TRUE);
obj->restack = 1;
Evas_Smart_Data *o = efl_data_scope_get(smart_obj, MY_CLASS);
o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj));
- efl_data_unref(eo_obj, obj);
o->member_count--;
obj->smart.parent = NULL;
evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE, EINA_TRUE);
}
/* all nice and private */
-static void
+static inline void
evas_object_smart_init(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
do \
{ \
eina_array_push(array, obj); \
- efl_data_ref(obj->object, NULL); \
+ efl_data_ref(obj->object, EFL_CANVAS_OBJECT_CLASS); \
} while (0)
#define OBJS_ARRAY_CLEAN(array) \