elm: Partially revert "elementary: avoid random memory access."

This reverts commit ac5a0b7e79.

I added assert(pd == sd) in the modified code and couldn't find
anything suspicious. The proper class is used in eo_data_scope_get().
I also can't find a crash or a bug currently in hover. I know there
was a problem earlier, but that was fixed in 3092e08a83.

Now, if there is still a problem, we should check it carefully.
Pinging @cedric
This commit is contained in:
Jean-Philippe Andre 2016-06-03 12:01:35 +09:00
parent 5fd02a79cc
commit a4701ea969
2 changed files with 2 additions and 4 deletions

View File

@ -220,10 +220,9 @@ _item_find(const Evas_Object *obj,
}
static Eina_Bool
_elm_dayselector_content_set(Eo *obj, Elm_Dayselector_Data *pd, const char *item, Evas_Object *content)
_elm_dayselector_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item, Evas_Object *content)
{
Eina_Bool int_ret = EINA_FALSE;
Elm_Dayselector_Data *sd = eo_data_scope_get(obj, MY_CLASS);
int day;
char buf[1024];

View File

@ -400,10 +400,9 @@ _elm_hover_subs_del(Elm_Hover_Data *sd)
}
static Eina_Bool
_elm_hover_content_set(Eo *obj, Elm_Hover_Data *pd, const char *swallow, Evas_Object *content)
_elm_hover_content_set(Eo *obj, Elm_Hover_Data *sd, const char *swallow, Evas_Object *content)
{
Eina_Bool int_ret;
Elm_Hover_Data *sd = eo_data_scope_get(obj, MY_CLASS);
if (!swallow) return EINA_FALSE;