GTK-DOC: Detects macro as function instead of value
Submitted by Sebastian
Created attachment 310154 Macro recognized as function.
I am trying to document a macro with gtk-doc, the macro uses parenthesis around the macro definition, and this causes gtk-doc to recognize the macro as a function, which it is not.
Here is an example:
- Some A **/ #define MY_CLASS_A 0
- Some B **/ #define MY_CLASS_B 1
- Or of A and B **/ #define MY_CLASS_FOO (MY_CLASS_A|MY_CLASS_B)
If I compile this, then resulting document lists MY_CLASS_FOO under the category "Functions".
Now interestingly, if I change the macro, such that I break the line immediately after the macro name with a backslash, and place the remaining parts of the macro onto the next line, then the macro is correctly recognized and placed in the "Types and Values" section:
- Or of A and B
My guess is that gtk-doc does differentiate between 'MACRO()' and 'MACRO ()' and thus interprets both as being a function, but in fact function macros are not allowed to have a space between their name and the parenthesis. Thus 'MACRO ()' is not a function.
In case this is not a bug and I am mistaken about something, then I would love if you could clarify this case in the documentation of gtk-doc, and explain if there is a way to explicitly tell gtk-doc that this case is not a function macro.