You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hide prototypes for extension functions unless explicitly requested by defining `XR_EXTENSION_PROTOTYPES`. These functions are not exported from the loader, so having their prototypes available is confusing and leads to link errors, etc.
Copy file name to clipboardExpand all lines: specification/scripts/cgenerator.py
+42-3Lines changed: 42 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ def __init__(self,
27
27
protectFeature=True,
28
28
protectProto=None,
29
29
protectProtoStr=None,
30
+
protectExtensionProto=None,
31
+
protectExtensionProtoStr=None,
30
32
apicall='',
31
33
apientry='',
32
34
apientryp='',
@@ -56,6 +58,13 @@ def __init__(self,
56
58
set to None.
57
59
- protectProtoStr - #ifdef/#ifndef symbol to use around prototype
58
60
declarations, if protectProto is set
61
+
- protectExtensionProto - If conditional protection should be generated
62
+
around extension prototype declarations, set to either '#ifdef'
63
+
to require opt-in (#ifdef protectExtensionProtoStr) or '#ifndef'
64
+
to require opt-out (#ifndef protectExtensionProtoStr). Otherwise
65
+
set to None.
66
+
- protectExtensionProtoStr - #ifdef/#ifndef symbol to use around
67
+
extension prototype declarations, if protectExtensionProto is set
59
68
- apicall - string to use for the function declaration prefix,
60
69
such as APICALL on Windows.
61
70
- apientry - string to use for the calling convention macro,
@@ -93,6 +102,12 @@ def __init__(self,
93
102
self.protectProtoStr=protectProtoStr
94
103
"""#ifdef/#ifndef symbol to use around prototype declarations, if protectProto is set"""
95
104
105
+
self.protectExtensionProto=protectExtensionProto
106
+
"""If conditional protection should be generated around extension prototype declarations, set to either '#ifdef' to require opt-in (#ifdef protectExtensionProtoStr) or '#ifndef' to require opt-out (#ifndef protectExtensionProtoStr). Otherwise set to None."""
0 commit comments