Scripts/DefinitionExtract: Fixes some more function attributes

X11 has an attribute that was causing function declarations to be
missed.

These definitions exist in XLibint.h
eg:
```cpp
extern void _XEatData(
    Display*		/* dpy */,
    unsigned long	/* n */
) _X_COLD;
```

This `_X_COLD` attribute was causing these function definitions to get
missed.
This commit is contained in:
Ryan Houdek committed 2022-10-25 15:32:40 -07:00
1 parent 27b022d4d9
commit 0aff3941f4
1 file changed
+4 -4
+4 -4
View File
@@ -148,16 +148,16 @@ def HandleFunctionDeclCursor(Arch, Cursor):
elif (Child.kind == CursorKind.PARM_DECL):
# This gives us a parameter type
Function.Params.append(Child.type.spelling)
elif (Child.kind == CursorKind.UNEXPOSED_ATTR):
# Whatever you are we don't care about you
return Arch
elif (Child.kind == CursorKind.ASM_LABEL_ATTR):
# Whatever you are we don't care about you
return Arch
elif (Child.kind == CursorKind.WARN_UNUSED_RESULT_ATTR):
# Whatever you are we don't care about you
return Arch
elif (Child.kind == CursorKind.VISIBILITY_ATTR):
elif (Child.kind == CursorKind.VISIBILITY_ATTR or
Child.kind == CursorKind.UNEXPOSED_ATTR or
Child.kind == CursorKind.CONST_ATTR or
Child.kind == CursorKind.PURE_ATTR):
pass
else:
logging.critical ("\tUnhandled FunctionDeclCursor {0}-{1}-{2}".format(Child.kind, Child.type.spelling, Child.spelling))