Re: GObject-Introspection 0.5.0
- From: Murray Cumming <murrayc murrayc com>
- To: Mike Kestner <mkestner novell com>
- Cc: language-bindings gnome org, Johan Dahlin <johan gnome org>, gtk-devel-list gnome org, Alexander Larsson <alexl redhat com>
- Subject: Re: GObject-Introspection 0.5.0
- Date: Mon, 08 Sep 2008 17:28:16 +0200
On Mon, 2008-09-08 at 10:09 -0500, Mike Kestner wrote:
> 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.
or nothing is owned. Yes, we have these 3 in gtkmm too. Johan's system
offers a fourth combination, list-not-owned, element-owned, so-far not
seen in the wild), but it seems fine.
> 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.
>
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]