mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED new in 3.13. (#110969)
* Only add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED to limited C API version 3.13. * errno, xxlimited and _ctypes_test extensions now need the limited C API version 3.13 to get Py_MOD_PER_INTERPRETER_GIL_SUPPORTED. They now include standard header files explicitly: <errno.h>, <string.h> and <stdio.h>. * xxlimited_35: Remove Py_mod_multiple_interpreters slot, incompatible with limited C API version 3.5.
This commit is contained in:
parent
9a9fba825f
commit
db15fc23c6
5 changed files with 13 additions and 7 deletions
|
|
@ -1,8 +1,11 @@
|
|||
#define Py_LIMITED_API 0x03060000
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include <stdio.h> // printf()
|
||||
#include <stdlib.h> // qsort()
|
||||
#include <string.h> // memset()
|
||||
#ifdef MS_WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
/* Errno module */
|
||||
|
||||
// Need PyModuleDef_Slot added to limited C API version 3.5
|
||||
#define Py_LIMITED_API 0x03050000
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
|
||||
#include "Python.h"
|
||||
#include <errno.h> // EPIPE
|
||||
|
||||
/* Windows socket errors (WSA*) */
|
||||
#ifdef MS_WINDOWS
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@
|
|||
pass
|
||||
*/
|
||||
|
||||
#define Py_LIMITED_API 0x030b0000
|
||||
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030d0000
|
||||
|
||||
#include "Python.h"
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -293,7 +293,6 @@ xx_modexec(PyObject *m)
|
|||
|
||||
static PyModuleDef_Slot xx_slots[] = {
|
||||
{Py_mod_exec, xx_modexec},
|
||||
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue