mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
gh-110481: Implement biased reference counting (gh-110764)
This commit is contained in:
parent
05f2f0ac92
commit
6dfb8fe023
29 changed files with 511 additions and 52 deletions
|
|
@ -1,5 +1,11 @@
|
|||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
// gh-85283: On Windows, Py_LIMITED_API requires Py_BUILD_CORE to not attempt
|
||||
// linking the extension to python3.lib (which fails). Py_BUILD_CORE_MODULE is
|
||||
|
|
|
|||
|
|
@ -2,8 +2,12 @@
|
|||
posixshmem - A Python extension that provides shm_open() and shm_unlink()
|
||||
*/
|
||||
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,14 @@
|
|||
* using the SystemConfiguration framework.
|
||||
*/
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include <Python.h>
|
||||
#include <SystemConfiguration/SystemConfiguration.h>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
// Need limited C API version 3.13 for PyModule_Add() on Windows
|
||||
#ifndef Py_NOGIL
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
#define Py_LIMITED_API 0x030c0000 // 3.12
|
||||
#endif
|
||||
|
||||
#include "parts.h"
|
||||
#include <stddef.h> // max_align_t
|
||||
#include <string.h> // memset
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
/* Test Vectorcall in the limited API */
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
#define Py_LIMITED_API 0x030c0000 // 3.12
|
||||
#endif
|
||||
|
||||
#include "parts.h"
|
||||
#include "clinic/vectorcall_limited.c.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,14 @@
|
|||
#undef Py_BUILD_CORE_MODULE
|
||||
#undef Py_BUILD_CORE_BUILTIN
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
// For now, only limited C API 3.13 is supported
|
||||
#ifndef Py_NOGIL
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
/* Always enable assertions */
|
||||
#undef NDEBUG
|
||||
|
|
|
|||
|
|
@ -4,7 +4,13 @@
|
|||
* foo, bar), only the first one is called the same as the compiled file.
|
||||
*/
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
#define Py_LIMITED_API 0x03020000
|
||||
#endif
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,14 @@
|
|||
* DCE compatible Universally Unique Identifier library.
|
||||
*/
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#if defined(HAVE_UUID_H)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
/* Errno module */
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include <errno.h> // EPIPE
|
||||
|
|
|
|||
|
|
@ -16,8 +16,14 @@
|
|||
|
||||
/* MD5 objects */
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include "hashlib.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include <errno.h> // errno
|
||||
|
|
|
|||
|
|
@ -62,8 +62,14 @@
|
|||
pass
|
||||
*/
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@
|
|||
* See the xxlimited module for an extension module template.
|
||||
*/
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include "pyconfig.h" // Py_NOGIL
|
||||
#endif
|
||||
|
||||
#ifndef Py_NOGIL
|
||||
#define Py_LIMITED_API 0x03050000
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue