eina_model: change the way extensions are done.
authorGustavo Sverzut Barbieri <barbieri@gmail.com>
Tue, 31 Jan 2012 15:26:48 +0000 (15:26 +0000)
committerGustavo Sverzut Barbieri <barbieri@gmail.com>
Tue, 31 Jan 2012 15:26:48 +0000 (15:26 +0000)
commit088ab8dd2b241dbeedffd8ce1bb942156917662a
tree34f6d5ae4632e85788d5c6aee2caf8afd3454eea
parentf91a385b62ef24161440fd2b0873acc1505df813
eina_model: change the way extensions are done.

Thanks to Tasn review it was noticed that subclasses using "const void *value"
with sub-structure would have to resolve their methods manually, quite bad.

Then the extension will happen with structures inside structures, as
previously used in Evas_Smart_Class. To allow the system to resolve
the methods and keep it, it is now specificed the type_size.

A new function is added to help extensions:
eina_model_type_method_resolve(), together with few helper macros.

To allow Eina_Model_Type to be augmented with more methods without
breaking the ABI, 4 slots are left there. We expect we got it right
from beginning and these will never be used, but we can never be sure
;-)

Last but not least, similar changes were done to Eina_Model_Interface
for consistency matters.

SVN revision: 67635
legacy/eina/src/include/eina_model.h
legacy/eina/src/lib/eina_model.c