mirror of https://github.com/python/cpython
bpo-43688: Fix Py_LIMITED_API version of xxlimited (GH-25135)
xxlimited targets Python 3.10, not Python 3.16: fix the hexadecimal version number used in the Py_LIMITED_API macro.
This commit is contained in:
parent
61092a99c4
commit
2ac0515027
|
@ -79,15 +79,15 @@ PyAPI_FUNC(PyObject *) PyCMethod_New(PyMethodDef *, PyObject *,
|
||||||
|
|
||||||
#define METH_COEXIST 0x0040
|
#define METH_COEXIST 0x0040
|
||||||
|
|
||||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03100000
|
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030a0000
|
||||||
#define METH_FASTCALL 0x0080
|
# define METH_FASTCALL 0x0080
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This bit is preserved for Stackless Python */
|
/* This bit is preserved for Stackless Python */
|
||||||
#ifdef STACKLESS
|
#ifdef STACKLESS
|
||||||
#define METH_STACKLESS 0x0100
|
# define METH_STACKLESS 0x0100
|
||||||
#else
|
#else
|
||||||
#define METH_STACKLESS 0x0000
|
# define METH_STACKLESS 0x0000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* METH_METHOD means the function stores an
|
/* METH_METHOD means the function stores an
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x03100000</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x030A0000</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -1867,7 +1867,7 @@ class PyBuildExt(build_ext):
|
||||||
if 'd' not in sysconfig.get_config_var('ABIFLAGS'):
|
if 'd' not in sysconfig.get_config_var('ABIFLAGS'):
|
||||||
# Non-debug mode: Build xxlimited with limited API
|
# Non-debug mode: Build xxlimited with limited API
|
||||||
self.add(Extension('xxlimited', ['xxlimited.c'],
|
self.add(Extension('xxlimited', ['xxlimited.c'],
|
||||||
define_macros=[('Py_LIMITED_API', '0x03100000')]))
|
define_macros=[('Py_LIMITED_API', '0x030a0000')]))
|
||||||
self.add(Extension('xxlimited_35', ['xxlimited_35.c'],
|
self.add(Extension('xxlimited_35', ['xxlimited_35.c'],
|
||||||
define_macros=[('Py_LIMITED_API', '0x03050000')]))
|
define_macros=[('Py_LIMITED_API', '0x03050000')]))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue