Re: [anjuta-devel] Change project property interface



Hi Abderrahim,


Le 22/12/2011 09:42, Abderrahim Kitouni a écrit :
I wasn't aware of this, and this is something introspection doesn't like
(you could keep it but it shouldn't be used by introspection backends).

Yes, it wasn't planned for introspection :). Moreover without this flags you have the behavior you want which is even used in C.


Right, but in contrast to the current approach it could be done in the
finalizer (it just has to iterate through the properties freeing their
user_data, and doesn't need to touch the properties lists).  Anyway, this
isn't a problem. The C plugins could be kept (mostly) unchanged for now.

Ok, I have asked to know how it's working, that's fine and indeed the C plugin doesn't need to be changed.


The content is a C struct (in our example AnjutaProjectInfo) wrapped in
a Python object, so as long as the wrapper is kept alive, it won't free
the C struct. Lists and arrays are handled differently since all
languages have their native list types and don't need to wrap the GLib
implementation.

Ok, that's clear.


The problem doesn't happen with boxed structs, they will not be freed as
long as the wrapping object is alive. We could replace the current
_insert_property_info by a _set_properties_info that takes a (transfer
container) list, but the end result would be the same.
I don't think the memory gain for doing something else is substantial,
so I'd rather keep it like this. (see also my patches in bug 666679)

Ok, I think everything is clear now. I haven't looked at your patch but I think I will commit them without any changes. That will be good to complete all this, thanks.


Regards,

Sébastien



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