GNOME Bugzilla – Bug 638330
const in parameter list is ignored
Last modified: 2011-01-10 12:38:29 UTC
If const is combined with another keyword (e.g. unsigned) in a function parameter list, it is ignored in the output. Example code showing the bug: cairo_status_t (*cairo_write_func_t) (void *closure, const unsigned char *data, unsigned int length); In the generated docs the const is missing, see also https://bugs.freedesktop.org/show_bug.cgi?id=28060
Created attachment 177246 [details] [review] Fix missing const in parameter list This patch resolves the bug. The regex can obviously be simplified more by removing the double keywords ('unsigned long', etc.) from the list of alternatives, but this is the smallest change that resolves the bug
Thanks for tracking it down. The patch was against a generated file instead of the .in file. I change it and also added a test case. Please consider filing git formatted patches in the future. Those contain the commit comment and you as the author already :) commit 4cfc71cd836d73b15254f73f58d8fd5f85fcc1f6 Author: Maarten Bosmans <mkbosmans@gmail.com> Date: Mon Jan 10 14:35:16 2011 +0200 parsing: improve parsing of arguments The 'const' in a 'const unsigned char *xxx' parameter was dropped. Add test-case as well. Fixes #638330.