Page MenuHomePhabricator

eo: change API call of efl_class_functions_set

Authored by bu5hm4n on Feb 6 2019, 1:14 AM.



This commit is the first commit of a series of commits. This commits prepares the eo call efl_class_functions_set. This means, it adds a new parameter to this function, for getting support for this we have to adjust eolian_mono, eolian_gen eolian_cxx and the tests of eolian / eo / bindings. In order to have this massive change splitted from the actual introduction of reflection, this commit brings the parameter changes.

Reflection is a common technique in OOP to get access to the own structure of classes. Without the need of actual linking, achiving this completly in eo is quite a big thing, so for this we start with a very small reflection API which allows you to access property-API by string keys. For this we need a table in eo which contains all names of properties with the corresponding getters and setters.

The new parameter in efl_class_functions_set is meant to be the parameter for this table. The real type of it and the implementation follows in the next commit.

This commit also brings basically 0 funcitonal changes and just adjusts the function definition and its calls with a additional NULL parameter.

ref T7681

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
bu5hm4n created this revision.Feb 6 2019, 1:14 AM
bu5hm4n requested review of this revision.Feb 6 2019, 1:14 AM
cedric accepted this revision.Feb 6 2019, 1:58 AM
This revision is now accepted and ready to land.Feb 6 2019, 1:58 AM
segfaultxavi requested changes to this revision.Feb 6 2019, 2:35 AM

The commit message gives no indication about what this commit does so I looked at the code. The obvious entry point is in Eo.h, where I see a new param has been added to efl_class_functions_set(). However I have absolutely no idea what a reflection_table is. Moreover, its type is void * so no clues.
Can you improve the docs on that new param? What's its purpose, how do I use it, what's its real type, ...

Also, this patch is huge but maybe it could be made smaller if whitespace fixes were committed separately?

This revision now requires changes to proceed.Feb 6 2019, 2:35 AM

Now I see this is the first part in a series. Still, if I did git blame on the efl_class_functions_set() line in Eo.h it would bring me to this commit message and I would have no idea what is going on. Locating the "next commit" for an explanation might be complicated, soooo.... more docs please :)

bu5hm4n edited the summary of this revision. (Show Details)Feb 6 2019, 3:01 AM
segfaultxavi accepted this revision.Feb 6 2019, 3:05 AM


This revision is now accepted and ready to land.Feb 6 2019, 3:05 AM
Closed by commit rEFL0709bdea6f94: eo: change API call of efl_class_functions_set (authored by Marcel Hollerbach <>). · Explain WhyFeb 7 2019, 5:43 AM
This revision was automatically updated to reflect the committed changes.