diff options
author | Victor Stinner <vstinner@python.org> | 2024-03-11 22:42:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-11 22:42:18 (GMT) |
commit | 2b67fc57f6e97c8389fe970ed232c1ad484113e1 (patch) | |
tree | 913984c1a9d4bedfc34ce8de9f1847873b41a51c /Tools | |
parent | 06e29a224fac9edeba55422d2e60f2fbb88dddce (diff) | |
download | cpython-2b67fc57f6e97c8389fe970ed232c1ad484113e1.zip cpython-2b67fc57f6e97c8389fe970ed232c1ad484113e1.tar.gz cpython-2b67fc57f6e97c8389fe970ed232c1ad484113e1.tar.bz2 |
gh-108494: Fix Argument Clinic LIMITED_CAPI_REGEX (#116610)
Accept spaces in "# define Py_LIMITED_API 0x030d0000".
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/clinic/clinic.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 8353941..893f4cc 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -66,8 +66,9 @@ from libclinic import ClinicError # -# match '#define Py_LIMITED_API' -LIMITED_CAPI_REGEX = re.compile(r'#define +Py_LIMITED_API') +# Match '#define Py_LIMITED_API'. +# Match '# define Py_LIMITED_API 0x030d0000' (without the version). +LIMITED_CAPI_REGEX = re.compile(r'# *define +Py_LIMITED_API') class Sentinels(enum.Enum): |