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 605052 - put class structs to the generated section file
put class structs to the generated section file
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.13
Other Linux
: Normal normal
: 1.14
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2009-12-20 11:33 UTC by Yeti
Modified: 2010-01-03 11:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (975 bytes, patch)
2009-12-20 11:47 UTC, Yeti
committed Details | Review

Description Yeti 2009-12-20 11:33:07 UTC
To document virtual methods of classes and interfaces, they must be present in the section file.  gtkdoc-scan excludes them when generating the section file (either for the first time or with --rebuild-sections) with the following code:

    # Take out any object structs from the list of declarations as we don't
    # want them included.
    my ($object);
    foreach $object (@objects) {
	$list =~ s/^$object\n//m;
	$list =~ s/^${object}Class\n//m;
	$list =~ s/^${object}Iface\n//m;
	$list =~ s/^${object}Interface\n//m;
    }

So, apparently it does it on purpose.  According to git blame, the code was added by Owen Taylor in 1998 (at that time, no --rebuild-sections existed, of course, so it represented only a default).

For some reason (that don't know yet) the object handling code adds the object twice to the symbol list (i.e. there is e.g. MyFoo, MyFoo and MyFooClass).  So the object is removed once and one copy remains in the symbol list, whereas the class or interface is present only once and hence is removed for good.

I suggest to:
1) remove this take-out code (note it affects only those who use --rebuild-sections or gtkdocize for the first time)
2) find out why the object appears twice in the list and correct it
Comment 1 Yeti 2009-12-20 11:47:13 UTC
Created attachment 150105 [details] [review]
proposed patch
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2009-12-24 22:10:55 UTC
That looks good and it should be save as this only affect projects that use --rebuild-types (or do a first run), right? I'll run some doc build with this applied in the next days.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-03 11:18:23 UTC
commit 12693564a6dd1f01b7c95794f64c0385cef79566
Author: David Nečas <yeti@physics.muni.cz>
Date:   Sun Jan 3 13:15:34 2010 +0200

    scan:  put class structs to the generated section file, FIxes #605052
    
    To document virtual methods of classes and interfaces, they must be present in
    the section file.  gtkdoc-scan excluded them when generating the section file.
    It is now the consensus that it is better to have a brief doc-blob instead of
    hiding the symbol by default.