language-bindings@gnome.org
[Top] [All Lists]

Re: GObject-Introspection 0.5.0

Subject: Re: GObject-Introspection 0.5.0
From: Mike Kestner
Date: Mon, 08 Sep 2008 10:09:35 -0500
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@xxxxxxxxxx>

_______________________________________________
language-bindings mailing list  language-bindings@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/language-bindings

<Prev in Thread] Current Thread [Next in Thread>