Skip to content

Commit 4a85026

Browse files
committed
gh-108494: Fix Argument Clinic LIMITED_CAPI_REGEX
Accept spaces in "# define Py_LIMITED_API 0x030d0000".
1 parent 113053a commit 4a85026

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tools/clinic/clinic.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@
6666
#
6767

6868

69-
# match '#define Py_LIMITED_API'
70-
LIMITED_CAPI_REGEX = re.compile(r'#define +Py_LIMITED_API')
69+
# Match '#define Py_LIMITED_API'.
70+
# Match '# define Py_LIMITED_API 0x030d0000' (without the version).
71+
LIMITED_CAPI_REGEX = re.compile(r'# *define +Py_LIMITED_API')
7172

7273

7374
class Sentinels(enum.Enum):

0 commit comments

Comments
 (0)