GNOME Bugzilla – Bug 607445
gtk-doc does not support long double as returned value type
Last modified: 2010-03-04 22:24:36 UTC
when a function returns a long double, I get an error message such as: Can't parse args for function in "<RETURNS>long double </RETURNS> GOCSplinel const *sp, long double x " at /usr/local/share/gtk-doc/data/gtkdoc-common.pl line 429, <INPUT> line 1379. Use of uninitialized value $ret_type in string ne at /usr/local/bin/gtkdoc-mktmpl line 388, <INPUT> line 1379. Seems that things work for functions having long double arguments but returning something else.
Whats the whole function declaration?
I added this to the tests and it just works fine. Which version are you using? /** * bug_607445: * @a: parameter * * http://bugzilla.gnome.org/show_bug.cgi?id=607445 */ long double bug_607445(long double a) { return 2.0*a; }
Here is one of the functions we have in goffice in that gtk-doc does not love: long double go_matrix_determinantl (long double **A, int n); The error message is: unknown:0: warning: Can't parse args for function go_matrix_determinantl: <RETURNS>long double </RETURNS> long double **A, int n Use of uninitialized value $ret_type in string ne at /usr/bin/gtkdoc-mktmpl line 438, <INPUT> line 1487. I'm using gtk-doc 1.13.
This seems to be fixed in git HEAD. Any change you can try gtk-doc from gnome git?
Uh, just realized that I don't use tmpl docs in the unit tests, so it could be related to that also. So if you could still try git head I would get the right line number for the error. Please also consider moving the tmpl docs to inline source comments. The use of tmpl docs is deprecated. The git tree has a migration helper under tools directory and the docs (yelp) tell how to switch to a gtkdoc.mak flavour that skips the tmpl step totally.
build of gtk-doc from git fails for me with: warning: failed to load external entity "db2omf.lang" cannot parse db2omf.lang I'll investigate when time permits.
(In reply to comment #6) > build of gtk-doc from git fails for me with: > > warning: failed to load external entity "db2omf.lang" > cannot parse db2omf.lang > > I'll investigate when time permits. That could be from scrollkeeper/rarian? Maybe --disable-scrollkeeper helps.
--disable-scrollkeeper made the build succeed, although I had to run make maintainer-clean before, and that surprisingly erased ChangeLog. Otherwise, the issue is still there. I'll try to skip the tmpl step.
Could you give me the error message for the git version. After all it might be easy to fix. Are you putting docs to inline comments or are you using tmpl files?
We do not use tmpl files, just inline comments. The message I get when not using --flavour no-tmpl is: gtk-doc: Rebuilding template files Can't parse args for function in "<RETURNS>long double </RETURNS> long double **A, int n " at /usr/local/share/gtk-doc/data/gtkdoc-common.pl line 429, <INPUT> line 1487. Use of uninitialized value $ret_type in string ne at /usr/local/bin/gtkdoc-mktmpl line 388, <INPUT> line 1487. If tmpl is disabled, there is no more error message, things just work fine. Thanks a lot for your help.
I hope this fixes it also for the tmpl case. commit 30f95dd1913ff2517c196230d51ec813e735fbc3 Author: Stefan Kost <ensonic@users.sf.net> Date: Fri Mar 5 00:20:39 2010 +0200 mktmpl: improve return type handling. Fixes #607445 Always remove the return tag before pushing it further and then try to parse it.