Re: GObject-Introspection 0.5.0



On Sun, 2008-09-07 at 17:01 +0200, Johan Dahlin wrote:
> Alexander Larsson wrote:
> > On Mon, 2008-09-01 at 09:35 +0200, Johan Dahlin wrote:
> >> I'm proud to announce the initial release of GObject-Introspection.
> >> Colin Walters and I have been hacking madly on it for the past couple of 
> >> weeks and we have finally reached a point to where we're ready for more
> >> more users.
> >>
> >> Tarball can be found at:
> >>     http://download.gnome.org/sources/gobject-introspection/0.5/
> >>
> >> The goal of the project is to describe the APIs and collect them in
> >> a uniform, machine readable format. The initial target is language bindings, 
> >> which are heavy users of this kind of data.
> > 
> > I have a question about the details of GITransfer.
> 
> GITransfer is still a bit in a flux as none of the existing (open) users
> use it yet.
> 
> GITransfer is part of the typelib which hasn't yet been updated to the 
> revised XML format. One of the main changes was to allow nested types 
> definitions, and thus being able to specify things such as:
> - type of the list
> - type of the element
> 
> 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;
> 
> 
> Ownership examples of existing APIs:
>    gtk_container_get_children: list = caller, element = callee
>    gtk_icon_view_get_selected_items: list = caller, element = caller
>    gtk_rc_get_default_files: list = callee, element = callee

So, your specify ownership twice, once for container and once for
contents? Makes sense to me. 

The problem with the "transfer" terminology is that it takes a different
meaning for in args than for out/return args, and this way we can avoid
that.




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