Page MenuHomePhabricator

eo: add an API entry for custom instantiation of Eo objects for binding usage

Authored by vitor.sousa on Jun 4 2019, 3:39 PM.



Add a new function in the Eo API in order to provide more options on object
instantiation for binding creators.

For the Eo lib to be able to construct objects that inherit from bindings in
many languages we should provide a way for bindings to call different kinds of
constructors, in a way that simply overriding the efl_constructor method is
not enough.
We need a way to differentiate at construction time if the Eo is being
constructed from C or from the binding, because if it is the
former we need too call the inherited object constructor from C and instantiate
a new object, and if it is the later we need to avoid instantiating a
new object because we are already in the middle of the process of creating
a new one.
efl_constructor alone does not provide any way of distinguishing between
those situations, so, being able to pass additional information for
efl_add_start (like a custom constructor pointer) is necessary to make the
right distinction.

Test Plan

meson test and make test

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
vitor.sousa created this revision.Jun 4 2019, 3:39 PM
vitor.sousa requested review of this revision.Jun 4 2019, 3:39 PM
segfaultxavi added a subscriber: q66.

Probably @q66 also wants to know about this.

cedric accepted this revision.Jun 25 2019, 4:20 PM

This has been sitting here for weeks with no complaint or any reason for it not to have landed. So lets do it now.

This revision is now accepted and ready to land.Jun 25 2019, 4:20 PM
This revision was automatically updated to reflect the committed changes.