[Vala] gidl and ownership transfer



I'm not sure if this is the right list, but since Vala is the only project currently using GIDL, I thought I would post this here.

Looking at the GIDL DTD, it seems that the 'transfer' ownership attribute on parameters defaults to 'full'. This seems strange to me. I realize that primitive types are implicitly transferred, but it's strange to think of memory ownership for primitive types. For reference types, most of the time the transfer is "none" for in parameters (except floating references, but that's another story). I don't think Vala can even handle transfer of ownership when passing a reference in to a function. Return values are more often "full" ("ref" in Vala) but probably not enough for it to be default in GIDL.

The old "defs" format in PyGTK uses the caller-owns-return attribute for "full" transfer in return values. It was not the default, as far as I know.

What do you guys think?

Michael


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