After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779501 - Type of GIConv given wrongly on web
Type of GIConv given wrongly on web
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-03-02 21:59 UTC by Reuben Thomas
Modified: 2017-10-30 09:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix bogus override for GIConv (831 bytes, patch)
2017-10-26 19:41 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Reuben Thomas 2017-03-02 21:59:26 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.)
Comment 1 Daniel Boles 2017-03-02 22:05:18 UTC
the documentation is generated from the code, so it seems that gtk-doc loses the *
Comment 2 Philip Withnall 2017-10-05 14:39:02 UTC
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;
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2017-10-05 16:29:52 UTC
which gtk-doc version?
Comment 4 Philip Withnall 2017-10-09 08:42:12 UTC
(In reply to Stefan Sauer (gstreamer, gtkdoc dev) from comment #3)
> which gtk-doc version?

1.25.1 (commit 4fe8acc).
Comment 5 Philip Withnall 2017-10-09 09:06:09 UTC
I just checked with 1.26.1 (commit 95a93122a2934e618024f291620edd9c9a3c4e3b; git master as of now), and the behaviour is the same.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2017-10-26 19:41:49 UTC
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
Comment 7 Philip Withnall 2017-10-27 11:06:22 UTC
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.
Comment 8 Philip Withnall 2017-10-27 11:07:31 UTC
Thanks for working on all these gtk-doc (or actually GLib) bugs, Stefan!
Comment 9 Reuben Thomas 2017-10-27 11:12:06 UTC
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!).