Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3f5c564

Browse filesBrowse files
authored
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.
1 parent 26e06ad commit 3f5c564
Copy full SHA for 3f5c564

File tree

2 files changed

+11
-2
lines changed
Filter options

2 files changed

+11
-2
lines changed

‎Include/pyport.h

Copy file name to clipboardExpand all lines: Include/pyport.h
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
# define Py_BUILD_CORE
4949
#endif
5050

51+
#if defined(Py_LIMITED_API) && defined(Py_BUILD_CORE)
52+
# error "Py_LIMITED_API is not compatible with Py_BUILD_CORE"
53+
#endif
54+
5155

5256
/**************************************************************************
5357
Symbols and macros to supply platform-independent interfaces to basic

‎Tools/c-analyzer/c_parser/preprocessor/gcc.py

Copy file name to clipboardExpand all lines: Tools/c-analyzer/c_parser/preprocessor/gcc.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33

44
from . import common as _common
55

6-
# The following C files must not be built with Py_BUILD_CORE,
7-
# because they use the limited C API.
6+
# The following C files define the Py_LIMITED_API macro, and so must not be
7+
# built with the Py_BUILD_CORE macro defined.
88
USE_LIMITED_C_API = frozenset((
9+
# Modules/
910
'_testcapimodule.c',
1011
'_testclinic_limited.c',
1112
'xxlimited.c',
1213
'xxlimited_35.c',
14+
15+
# Modules/_testcapi/
16+
'heaptype_relative.c',
17+
'vectorcall_limited.c',
1318
))
1419

1520
TOOL = 'gcc'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.