GNOME Bugzilla – Bug 580300
gtkdoc-scan picks up _get_type functions it should not
Last modified: 2009-06-27 19:55:15 UTC
gtkdoc-scan should not pick up this function because it takes arguments. It's clearly not defining a GObject type. GType go_conf_get_type (GOConfNode *node, gchar const *key);
Version 1.10 as reported with "--version". gtkdoc-scangobj makes assumptions on arguments as well as return type: for (@types) { print OUTPUT "extern GType $_ (void);\n"; }
Its know fact that gtkdoc-scan --rebuild-types has limmitations. It only works if you follow GObject conventions. But I agree that more smartness would be useful here. Would you be willing to try to make a patch?
Apparently you've been not so much worried to try to fix it. Also you analysis was a bit off. gtkdoc-scangobj makes no assumtions, you simply shall not put crap into the types file. I made gtkdoc-scan that offers to write a types file for you a bit smarter though to adhere to the rules too :) commit 613e1f7dca2ccb1cbe95386070e94ba0c41cddf8 Author: Stefan Kost <ensonic@users.sf.net> Date: Sat Jun 27 22:46:11 2009 +0300 scan: be smarter in when trying to figure the get_type functions, Fixes #580300 Check full prototype instead of just the name when using --rebuild-types. Also sort the types by name to minimize the delta when rebuilding.