On Fri, May 11, 2012 at 4:14 PM, Christophe Fergeau <cfergeau(a)redhat.com> wrote:
On Fri, May 11, 2012 at 01:32:34PM +0100, Daniel P. Berrange wrote:
> If I look at the docs for GTK, I see GTK-DOC is including details of
> the annotations:
>
> eg
>
>
http://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-get-defa...
>
> "Returns: copy of default icon list. [element-type GdkPixbuf][transfer
container]"
>
>
> IMHO this is sufficient and we don't need to explicitly mention the
> transfer rules in the docs string.
I know it's in there, but if you are not familiar with gtk conventions at
all, you have to first figure out what that means exactly, and then you
have to find the correct way of free-ing the container and what it contains
(which is not necessarily g_object_unref, it can contain strings, boxed
types, ...). That's why I really prefer having it mentioned explicitly,
memory handling is boring enough/error-prone enough so anything that makes
it simpler is a plus in my opinion.
I don't exactly disagree with your assertions here but what you are
proposing is a local work-around. If this really is a big issue, we
have a major issue in all our gtk-doc/gir-using libraries. The
solution is to hack gtk-doc and there is no reason to have a
work-around till that is fixed. Any ways, the patch is pushed so if
you don't agree with me and Daniel, feel free to make corrections in
master.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124