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 512155 - gets confused by multiline typedef
gets confused by multiline typedef
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal minor
: 1.14
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-26 00:46 UTC by Behdad Esfahbod
Modified: 2010-01-01 23:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Behdad Esfahbod 2008-01-26 00:46:24 UTC
The following typedef:

-typedef cairo_status_t
-(*cairo_pdf_operators_use_font_subset_t) (unsigned int  font_id,
-                                         unsigned int  subset_id,
-                                         void         *closure);


makes gtk-doc think cairo_status_t is a function.  Reformatting to:

+typedef cairo_status_t (*cairo_pdf_operators_use_font_subset_t) (unsigned int  font_id,
+                                                                unsigned int  subset_id,
+                                                                void         *closure);

fixes it.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2008-05-20 17:30:50 UTC
Yes, the beauty of a perl-regexp parser at work trying to parse c :(
I'll see what I can do.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2009-11-26 10:20:01 UTC
I'll added some variants to the tests and its actually only the first one that fails. I don't see an easy fix though :/

/**
 * bug_512155a_function_pointer_t:
 *
 * http://bugzilla.gnome.org/show_bug.cgi?id=512155
 */
typedef int
(*bug_512155a_function_pointer_t) (unsigned int arg1, unsigned int arg2,
                                  unsigned int arg3);

/**
 * bug_512155b_function_pointer_t:
 *
 * http://bugzilla.gnome.org/show_bug.cgi?id=512155
 */
typedef
int (*bug_512155b_function_pointer_t) (unsigned int arg1, unsigned int arg2,
                                       unsigned int arg3);

/**
 * bug_512155c_function_pointer_t:
 *
 * http://bugzilla.gnome.org/show_bug.cgi?id=512155
 */
typedef int (*bug_512155c_function_pointer_t) (unsigned int arg1,
                                               unsigned int arg2,
                                               unsigned int arg3);
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-01 23:03:19 UTC
commit 8d4e46323b6ea82ed966c4b65f1344b651e20255
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Sat Jan 2 01:00:03 2010 +0200

    scan: improve the scanner, Fixes #512155
    
    Handle multiline typedefs. Better debug logging. Handle function pointers better.