On 21/10/2019 18:51, Marcel Hollerbach wrote:
> On 10/21/19 5:37 PM, Tom Hacohen wrote:
>> I agree it's most of them, though it's not all of them. IIRC there are
>> some that indicate "nothing happened", at least in textblock. It
>> shouldn't be too hard to fix these though.
>>
>> Maybe in general we need a way to mark a return/parameter as an error
>> indicator? It's just a half-baked thought, though maybe worth exploring.
> 
> Maybe some internal "error_flag" type from eolian, which can be
> translated to a Exception in the languages supporting them, or to a
> simple Eina_Bool in case of C ?

Yeah, that's what I had in mind. Not necessarily Eina_Bool, it could be
an int too, or probably whatever?


error_return bool;
or
return bool @error;

Not sure to be honest, needs thinking, but just generally what I had in
mind.



> It can only be returned (so exceptions do work). This would also not
> mean a API/ABI break to C.
Yup, defo.

> 
>>
>> -- 
>> Tom
>>
>> On 21/10/2019 17:49, Xavi Artigas wrote:
>>> Hi people,
>>>
>>> We are encountering a problem when matching EO properties to C#
>>> properties,
>>> since the C# ones cannot have a return value.
>>>
>>> We mostly use return values in EO property setters to indicate error
>>> conditions and this is pretty easily matched to C# by throwing an
>>> exception. We just need to know WHEN a returned bool from a setter
>>> really
>>> means ERROR and when it is not.
>>> Currently, all property setters in our tree returning a bool use it to
>>> indicate an error, so it is just a matter of we all agreeing that in the
>>> future this will always be the case (and documenting it).
>>> If we agree on this, then the C# bindings can start throwing
>>> exceptions on
>>> setters returning FALSE (there's a patch ready, but I cannot access it
>>> right now).
>>>
>>> If nobody has anything against it, I'll land this patch in a week
>>> (October
>>> 28th).
>>>
>>> Thanks!
>>> Xavi
>>>
>>> _______________________________________________
>>> enlightenment-devel mailing list
>>> enlightenment-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>>
>>
>>
>> _______________________________________________
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
> 
> 
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to