Page MenuHomePhabricator

C#: Support eolian variables
Open, HighPublic


C# bindings must provide a way to access variables defined in .eo files. Currently they are used for initialization of Eina.Errors.

Support for constants was added in D8048 through their literal values. Variables instead must reflect their value from C. One alternative is to provide some wrapper class that have implicit operators that would dlsym/getprocaddress of the variable and get/set their value.

lauromoura triaged this task as High priority.
bu5hm4n added a subscriber: q66.Mar 12 2019, 3:25 AM

Uhm, I am a bit astonished that we have something like this in eolian, as it does not look that usefull. We pull in a completly new set of problems with this. How long is the value there valid? Who sets it / Who owns it. Are bindings allowed to set it ? Do we really need that ? Right now its only used for eina_error stuff afaics. And we might want to find a better solution for this. As this var thing looks super easy and dangerous to abuse ...

@q66 what is your opinion ?

q66 added a comment.Mar 12 2019, 4:33 AM

Yeah, I'm ok with not having vars, as the abuse potential is there. Constants are another matter, these are constrained and rather trivial.

@bu5hm4n @q66 How are we going to solve the Eina.Error problem then?
Thinks like Efl.Ui.Theme.Apply_Error.NONE are EO vars defined in efl_ui.eot and they are currently inaccessible from C#, making it impossible to check the result of any theming operation.

I think T6890 should solve out problem there ? (I hope at least)