From 0aff3941f45145fcd3b1bfdadd14436e7906d2e7 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 25 Oct 2022 14:54:26 -0700 Subject: [PATCH] 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. --- Scripts/DefinitionExtract.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/DefinitionExtract.py b/Scripts/DefinitionExtract.py index 21a396e2b..8e7a31a99 100755 --- a/Scripts/DefinitionExtract.py +++ b/Scripts/DefinitionExtract.py @@ -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))