forked from enlightenment/efl
Eina model: Fix another issue with the method resolve functios.
Make it possible to resolve foo (the last item). struct _My_Object_Type { Eina_Model_Type parent_class; ... void (*foo)(Eina_Model *, int); }; SVN revision: 67733
This commit is contained in:
parent
c0ab80f047
commit
b5de0cf46b
|
@ -4683,7 +4683,7 @@ eina_model_method_resolve(const Eina_Model *model, unsigned int offset)
|
||||||
|
|
||||||
desc = model->desc;
|
desc = model->desc;
|
||||||
EINA_SAFETY_ON_FALSE_RETURN_VAL
|
EINA_SAFETY_ON_FALSE_RETURN_VAL
|
||||||
(offset + sizeof(void *) < desc->cache.types[0]->type_size, NULL);
|
(offset + sizeof(void *) <= desc->cache.types[0]->type_size, NULL);
|
||||||
|
|
||||||
offset -= sizeof(Eina_Model_Type);
|
offset -= sizeof(Eina_Model_Type);
|
||||||
offset /= sizeof(void *);
|
offset /= sizeof(void *);
|
||||||
|
@ -4701,7 +4701,7 @@ eina_model_type_method_resolve(const Eina_Model_Type *type, const Eina_Model *mo
|
||||||
|
|
||||||
desc = model->desc;
|
desc = model->desc;
|
||||||
EINA_SAFETY_ON_FALSE_RETURN_VAL
|
EINA_SAFETY_ON_FALSE_RETURN_VAL
|
||||||
(offset + sizeof(void *) < desc->cache.types[0]->type_size, NULL);
|
(offset + sizeof(void *) <= desc->cache.types[0]->type_size, NULL);
|
||||||
|
|
||||||
return _eina_model_type_find_offset(type, offset);
|
return _eina_model_type_find_offset(type, offset);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue