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 663554 - broken docs
broken docs
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2011-11-07 12:52 UTC by Christian Persch
Modified: 2011-12-16 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Work around gtk-doc limitations (2.26 KB, patch)
2011-12-16 20:10 UTC, Matthias Clasen
committed Details | Review

Description Christian Persch 2011-11-07 12:52:43 UTC
As a result of gdk-doc bug 638449, the gdk-pixbuf docs are also broken. E.g. see http://developer.gnome.org/gdk-pixbuf/2.24/gdk-pixbuf-File-Loading.html where the gdk_pixbuf_new_from_file, gdk_pixbuf_new_from_file_at_size and gdk_pixbuf_new_from_file_at_scale functions are misdoc'd as macros and are missing their arguments.
Comment 1 Christian Persch 2011-11-07 12:56:17 UTC
Same issue for gdk_pixbuf_save[v].
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2011-11-07 19:40:28 UTC
How is "misdoc'd as macros" and "missing their arguments" related? Can you please add a link to the file that has trouble? I can see any thing troublesome here:
http://git.gnome.org/browse/gdk-pixbuf/tree/gdk-pixbuf/gdk-pixbuf-loader.h
Comment 3 Christian Persch 2011-11-07 19:57:56 UTC
They're missing their arguments in the "Synopsis" section, and when you go to one of them in the "Details" section the definition is missing the parameter list. 

E.g.:

gdk_pixbuf_new_from_file

#define gdk_pixbuf_new_from_file gdk_pixbuf_new_from_file_utf8

^^^ missing the argument list here!

Creates a new pixbuf by loading an image from a file. The file format is detected automatically. If NULL is returned, then error will be set. Possible errors are in the GDK_PIXBUF_ERROR and G_FILE_ERROR domains.

filename :
	Name of file to load, in the GLib file name encoding

error :
	Return location for an error

Returns :
	A newly-created pixbuf with a reference count of 1, or NULL if any of several error conditions occurred: the file could not be opened, there was no loader for the file's format, there was not enough memory to allocate the image buffer, or the image file contained invalid data.

^^^ this list exists, it's not what I mean above
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2011-11-07 20:16:53 UTC
* the * link * to * the * source * code * please *

being identified as macros and showing up crippled in the docs is unrelated.
Comment 5 Christian Persch 2011-11-07 20:31:54 UTC
The #defines that break gtk-doc are in gdk-pixbuf-core.h ; they're just the same sort of #defines that broke glib in gspawn.h.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2011-11-08 18:23:33 UTC
I see, it is these:
http://git.gnome.org/browse/gdk-pixbuf/tree/gdk-pixbuf/gdk-pixbuf-core.h#n287

I'll see if I can make a patch to prefer function protos over #defines as the later are most likely a work around for something in that case.

Anyway having the defines in a conditionally section or even one extra header per platform would be more robust.
Comment 7 Matthias Clasen 2011-12-16 20:10:12 UTC
The following fix has been pushed:
bde1d68 Work around gtk-doc limitations
Comment 8 Matthias Clasen 2011-12-16 20:10:14 UTC
Created attachment 203695 [details] [review]
Work around gtk-doc limitations

gtk-doc gets confused by the win32 compat _utf8 defines.
So, hide those from it.
Bug