GNOME Bugzilla – Bug 779501
Type of GIConv given wrongly on web
Last modified: 2017-10-30 09:49:38 UTC
The on-line developer documentation page at https://developer.gnome.org/glib/stable/glib-Character-Set-Conversion.html says for GIConv: typedef struct _GIConv GIConv; but it's a pointer type: the code clearly says: typedef struct _GIConv *GIConv; (And this has never been different: the code hasn't changed since it was introduced, I checked in git.)
the documentation is generated from the code, so it seems that gtk-doc loses the *
This is a gtk-doc bug. The relevant GLib code is from glib/gconvert.h: /** * GIConv: (skip) * * The GIConv struct wraps an iconv() conversion descriptor. It contains * private data and should only be accessed using the following functions. */ typedef struct _GIConv *GIConv;
which gtk-doc version?
(In reply to Stefan Sauer (gstreamer, gtkdoc dev) from comment #3) > which gtk-doc version? 1.25.1 (commit 4fe8acc).
I just checked with 1.26.1 (commit 95a93122a2934e618024f291620edd9c9a3c4e3b; git master as of now), and the behaviour is the same.
Created attachment 362371 [details] [review] fix bogus override for GIConv This is not a gtk-doc bug. glib decided to override the type of the symbol to be a struct and assigned a wrong decl: https://git.gnome.org/browse/glib/tree/docs/reference/glib/glib-overrides.txt#n291
Review of attachment 362371 [details] [review]: Ouch, that code dates from 2004. `git blame` doesn’t give any interesting information about why it’s there. Let’s drop it.
Thanks for working on all these gtk-doc (or actually GLib) bugs, Stefan!
Thanks very much for this fix: looks like a lot of work for a small thing, but no doubt it'll save others reading the documentation some head-scratching in future (quite possibly including me, when I've forgotten this problem and read the documentation again!).