Added the events: loaded and unloaded to notify eina_model_load() and
eina_model_unload() were called.
To be more specific, the interfaces used by EINA_MODEL_TYPE_MIXIN
(Eina_Model_Interface_Properties and Eina_Model_Interface_Children)
also do:
* properties,loaded
* properties,unloaded
* children,loaded
* children,unloaded
SVN revision: 68035
HUMAN_POOPER_IFACE must have ANIMAL_POOPER_IFACE as parent interface,
otherwise the order will be incorrect.
The test were also improved in other ways:
* use ck_assert_int_eq() instead of fail_if()... it prints the incorrect value
* check refcount
* unref models
* shutdown eina
SVN revision: 68034
We should lookup then in forward order, as they are sorted from
most-specific first, with parents at the end.
This breaks test, will fix in the last commit (3/3).
SVN revision: 68032
array, list, struct and others set() now copies the values. These
values can be created by user, in this case string is just a stack
object and not a real eina_stringshare.
To cope with it, add the string instead of referencing it. Bit slower,
but nicer behavior.
SVN revision: 67886
I did a bad decision to steal memory for Array, List, Hash and Struct
types, it was nice to not have to copy it internally, but breaks when
one needs to set a new value that was set elsewhere. What did not
happen with string, integers and other basic types.
This was exposed by Raphael Kubo using eina_model_property_set() with
complex types (Array, List and Hash) and it was not possible to
correctly set such properties.
Now it's all set, but the behavior changed and the memory is not
stolen and released anymore. Test eina_test_value.c was changed to
reflect it.
SVN revision: 67843
if user get and then set the same value, we should not crash and this
may happen with previous code as the old
string/array/value/list... were released, then you ended with the
released memory still being pointed.
SVN revision: 67841
We should not flush and then setup the memory, instead we leave
vset/pset functions do their own stuff to clean previous data, if any.
SVN revision: 67840
Let's try to help debug by allowing extended reference management that
takes in account an identifier. This identifier is accounted on xref
and xunref and must match.
xrefs_get will return the list of such references, for debugging purposes.
eina_models_list_get() was added to return all live models, just
tracked when EINA_MODEL_DEBUG is enabled.
eina_models_usage_dump() was added and use the same infrastructure as
eina_models_list_get() and eina_model_xrefs_get() to aid debugging :-)
SVN revision: 67821
He worked previously with documentation, now is helping me with
Eina_Model and will keep adding some examples and fixes here and
there.
SVN revision: 67798
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
val->value.ptr is just valid on 64bits platforms, as on 32bits both
pointers of the Eina_Value_Struct fits in the 8bytes of val->value.buf.
Always use the function to correctly retrieve it.
SVN revision: 67764