GNOME Bugzilla – Bug 605052
put class structs to the generated section file
Last modified: 2010-01-03 11:18:23 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
Created attachment 150105 [details] [review] proposed patch
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.
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.