GNOME Bugzilla – Bug 757294
Move G_POLLFD_FORMAT to glibconfig.h
Last modified: 2015-11-02 18:06:18 UTC
G_POLLFD_FORMAT is a platform-specific macro, and g-ir-scanner is happier processing one correct macro definition. There is a problem with gtk-doc, which does not seem to be limited to this change; the documentation for the macro can be recovered together with G_GOFFSET_FORMAT and similar macros, where it has currently fallen off as well.
Created attachment 314374 [details] [review] Move G_POLLFD_FORMAT to glibconfig.h It's a platform-specific macro, so it belongs in glibconfig.h. This ensures that g-ir-scanner will not pick the wrong definition for introspection.
Created attachment 314375 [details] [review] Moved the gtk-doc for G_POLLFD_FORMAT to docs.c An attempt to keep the documentation generated despite lacking a gtk-doc friendly place to define the macro. Changed the section to Miscellaneous Macros because this is one of the sections docs.c defines, and the macro is misc-y. This doesn't help recover the docs, though. But the problem seems to be common with G_GOFFSET_FORMAT and the like, which fall through gtk-doc despite being listed in glib-sections.txt and having strings in docs.c.
(In reply to Mikhail Zabaluev from comment #2) > This doesn't help recover the docs, though. But the problem seems > to be common with G_GOFFSET_FORMAT and the like, which fall through > gtk-doc despite being listed in glib-sections.txt and having strings > in docs.c. You probably need "#define G_GOFFSET_FORMAT", etc, in docs.c so gtk-doc will see *some* definition for the symbol.
(In reply to Dan Winship from comment #3) > You probably need "#define G_GOFFSET_FORMAT", etc, in docs.c so gtk-doc will > see *some* definition for the symbol. Nah, that didn't help. The symbols still end up in glib-undeclared.txt.
I'm using gtk-doc 1.24 from Fedora F22, if that's any help.
The brokenness comes from building in an off-tree build directory. When building in-tree, the documentation turns out fine.
Created attachment 314435 [details] [review] Moved the gtk-doc for G_POLLFD_FORMAT to docs.c An attempt to keep the documentation generated despite lacking a gtk-doc friendly place to define the macro. Changed the section to Miscellaneous Macros because this is one of the sections docs.c defines, and the macro is misc-y.
Comment on attachment 314435 [details] [review] Moved the gtk-doc for G_POLLFD_FORMAT to docs.c This ought to stay in gmain with GPollFD itself... is there still any problem with that after fixing the srcdir/builddir issue?
(where by "gmain", I mean the "The Main Event Loop" section of the docs)
Attachment 314374 [details] pushed as 0dbc81c - Move G_POLLFD_FORMAT to glibconfig.h