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:
Tom Hacohen 2012-02-07 13:24:27 +00:00
parent c0ab80f047
commit b5de0cf46b
1 changed files with 2 additions and 2 deletions

View File

@ -4683,7 +4683,7 @@ eina_model_method_resolve(const Eina_Model *model, unsigned int offset)
desc = model->desc;
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(void *);
@ -4701,7 +4701,7 @@ eina_model_type_method_resolve(const Eina_Model_Type *type, const Eina_Model *mo
desc = model->desc;
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);
}