Re: GObject-Introspection 0.5.0



On Sun, 2008-09-07 at 17:39 +0200, Johan Dahlin wrote:
> Paul Pogonyshev wrote:
> > Johan Dahlin wrote:
> >> [...]
> >>
> >  > I'm leaning towards using the "ownership" terminology instead of "transfer". 
> >> typedef enum {
> >>    GI_OWNERSHIP_CALLER, /* caller owns it, caller should free it after use */
> >>    GI_OWNERSHIP_CALLEE  /* callee owns it, caller should leave it as it is */
> >> } GITypeOwnership;
> > 
> > Just as a nitpick, these two names look very similar and quite confusing
> > for non-native English speakers.  Maybe you could come up with something
> > different, especially in place of 'callee'?
> 
> Agreed, I'm open to suggestions.
> caller/subroutine ?

In GAPI, we have two ownership attributes on list elements: owned and
elements_owned.  It's either true or false, and it is from the
perspective of the recipient of the object.  Thus, an owned list in a
return value is owned by the caller.  An owned list in a method "in"
parameter is owned by the function.

-- 
Mike Kestner <mkestner novell com>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]