FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-104469: Disallow using Py_LIMITED_API with Py_BUILD_CORE by vstinner · Pull Request #109690 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .h  (1) .py  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 4 additions & 0 deletions Include/pyport.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
# define Py_BUILD_CORE
#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
Expand Down
9 changes: 7 additions & 2 deletions Tools/c-analyzer/c_parser/preprocessor/gcc.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@

from . import common as _common

# The following C files must not be built with Py_BUILD_CORE,
# because they use the limited C API.
# The following C files define the Py_LIMITED_API macro, and so must not be
# built with the Py_BUILD_CORE macro defined.
USE_LIMITED_C_API = frozenset((
# Modules/
'_testcapimodule.c',
'_testclinic_limited.c',
'xxlimited.c',
'xxlimited_35.c',

# Modules/_testcapi/
'heaptype_relative.c',
'vectorcall_limited.c',
))

TOOL = 'gcc'
Expand Down

Back | FazBrowse Home | New Git URL