mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-137956: Guard against non-free-threaded extensions in free-threaded builds (GH-137957)
This commit is contained in:
parent
aa9ceb1721
commit
32b2c5de16
3 changed files with 58 additions and 0 deletions
|
|
@ -71,6 +71,8 @@ whose size is determined when the object is allocated.
|
|||
*
|
||||
* Statically allocated objects might be shared between
|
||||
* interpreters, so must be marked as immortal.
|
||||
*
|
||||
* Before changing this, see the check in PyModuleDef_Init().
|
||||
*/
|
||||
#if defined(Py_GIL_DISABLED)
|
||||
#define PyObject_HEAD_INIT(type) \
|
||||
|
|
@ -634,6 +636,7 @@ given type object has a specified feature.
|
|||
|
||||
// Flag values for ob_flags (16 bits available, if SIZEOF_VOID_P > 4).
|
||||
#define _Py_IMMORTAL_FLAGS (1 << 0)
|
||||
#define _Py_LEGACY_ABI_CHECK_FLAG (1 << 1) /* see PyModuleDef_Init() */
|
||||
#define _Py_STATICALLY_ALLOCATED_FLAG (1 << 2)
|
||||
#if defined(Py_GIL_DISABLED) && defined(Py_DEBUG)
|
||||
#define _Py_TYPE_REVEALED_FLAG (1 << 3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue