mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-104469: Disallow using Py_LIMITED_API with Py_BUILD_CORE (#109690)
Fix make check-c-globals: complete USE_LIMITED_C_API list of the c-analyzer.
This commit is contained in:
parent
26e06ad617
commit
3f5c5649cf
2 changed files with 11 additions and 2 deletions
|
@ -48,6 +48,10 @@
|
||||||
# define Py_BUILD_CORE
|
# define Py_BUILD_CORE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(Py_LIMITED_API) && defined(Py_BUILD_CORE)
|
||||||
|
# error "Py_LIMITED_API is not compatible with Py_BUILD_CORE"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Symbols and macros to supply platform-independent interfaces to basic
|
Symbols and macros to supply platform-independent interfaces to basic
|
||||||
|
|
|
@ -3,13 +3,18 @@ import re
|
||||||
|
|
||||||
from . import common as _common
|
from . import common as _common
|
||||||
|
|
||||||
# The following C files must not be built with Py_BUILD_CORE,
|
# The following C files define the Py_LIMITED_API macro, and so must not be
|
||||||
# because they use the limited C API.
|
# built with the Py_BUILD_CORE macro defined.
|
||||||
USE_LIMITED_C_API = frozenset((
|
USE_LIMITED_C_API = frozenset((
|
||||||
|
# Modules/
|
||||||
'_testcapimodule.c',
|
'_testcapimodule.c',
|
||||||
'_testclinic_limited.c',
|
'_testclinic_limited.c',
|
||||||
'xxlimited.c',
|
'xxlimited.c',
|
||||||
'xxlimited_35.c',
|
'xxlimited_35.c',
|
||||||
|
|
||||||
|
# Modules/_testcapi/
|
||||||
|
'heaptype_relative.c',
|
||||||
|
'vectorcall_limited.c',
|
||||||
))
|
))
|
||||||
|
|
||||||
TOOL = 'gcc'
|
TOOL = 'gcc'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue