2017-09-26 8:21 GMT+09:00 Gustavo Sverzut Barbieri <barbi...@gmail.com>:

> then we should have an equivalent of a constructor for a mixin? as you
> said, eventually "initialize to 0" is not good enough
>
> On Mon, Sep 25, 2017 at 7:11 PM, Cedric Bail <ced...@ddlm.me> wrote:
> >> -------- Original Message --------
> >> Subject: Re: [E-devel] [EGIT] [core/efl] master 02/02: ecore: force
> initialization of Efl.Io.Closer.Fd.
> >> Local Time: September 23, 2017 11:39 AM
> >> UTC Time: September 23, 2017 6:39 PM
> >> From: barbi...@gmail.com
> >> To: Enlightenment developer list <enlightenment-devel@lists.
> sourceforge.net>
> >>
> >> This is not right. You can use only -1 and you can use the constructor.
> >
> > It is a mixin that doesn't inherit from Efl.Object, so I can't see a way
> to use the constructor there. The problem of the initialization being 0,
> means that you end up with the possibility that a non initialized object
> will close fd 0 at fork time without owning that fd at all.
>

Just inherit from Efl.Object as an interface (ie. not the 1st class). There
is Efl.Interface if you need to inherit from a dummy interface.
Constructors work fine with mixins.

-- 
Jean-Philippe André
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to