forked from enlightenment/efl
Eina model: Made i_method_resolve a macro (for interface as well)
Same as the previous commit about "Type" this time about Interface. This will also hopefully remove the likelihood for hacks. Previous functions are still available as method_offset_resolve. SVN revision: 67786
This commit is contained in:
parent
87eb14012b
commit
29c291ff3b
|
@ -961,9 +961,9 @@ EAPI Eina_Bool eina_model_interface_deep_copy(const Eina_Model_Interface *iface,
|
|||
const Eina_Model *src,
|
||||
Eina_Model *dst) EINA_ARG_NONNULL(1, 2, 3);
|
||||
|
||||
EAPI const void *eina_model_interface_method_resolve(const Eina_Model_Interface *iface,
|
||||
const Eina_Model *model,
|
||||
unsigned int offset) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT EINA_PURE;
|
||||
#define eina_model_interface_method_resolve(iface, model, struct_type, method) eina_model_interface_method_offset_resolve((iface), (model), offsetof(struct_type, method))
|
||||
|
||||
EAPI const void *eina_model_interface_method_offset_resolve(const Eina_Model_Interface *iface, const Eina_Model *model, unsigned int offset) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT EINA_PURE;
|
||||
|
||||
|
||||
struct _Eina_Model_Event_Description
|
||||
|
|
|
@ -4829,8 +4829,8 @@ eina_model_interface_deep_copy(const Eina_Model_Interface *iface, const Eina_Mod
|
|||
return deep_copy(src, dst);
|
||||
}
|
||||
|
||||
EAPI const void *
|
||||
eina_model_interface_method_resolve(const Eina_Model_Interface *iface, const Eina_Model *model, unsigned int offset)
|
||||
EAPI const void
|
||||
*eina_model_interface_method_offset_resolve(const Eina_Model_Interface *iface, const Eina_Model *model, unsigned int offset)
|
||||
{
|
||||
EINA_MODEL_INTERFACE_IMPLEMENTED_CHECK_VAL(iface, model, NULL);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(offset >= sizeof(Eina_Model_Interface), NULL);
|
||||
|
|
Loading…
Reference in New Issue