Skip to content

Commit

Permalink
pythongh-108494: Fix Argument Clinic LIMITED_CAPI_REGEX
Browse files Browse the repository at this point in the history
Accept spaces in "#  define Py_LIMITED_API 0x030d0000".
  • Loading branch information
vstinner committed Mar 11, 2024
1 parent 113053a commit 4a85026
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
#


# 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):
Expand Down

0 comments on commit 4a85026

Please sign in to comment.