mirror of https://github.com/python/cpython
bpo-41111: xxlimited.c defines Py_LIMITED_API (GH-25151)
xxlimited.c and xxlimited_35.c now define the Py_LIMITED_API macro, rather than having to do it in the build recipe. Co-authored-by: Hai Shi <shihai1992@gmail.com>
This commit is contained in:
parent
9bb5658bd1
commit
240bcf82a1
|
@ -55,6 +55,8 @@
|
||||||
pass
|
pass
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define Py_LIMITED_API 0x030a0000
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
// Module state
|
// Module state
|
||||||
|
|
|
@ -5,10 +5,12 @@
|
||||||
* See the xxlimited module for an extension module template.
|
* See the xxlimited module for an extension module template.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Xxo objects */
|
#define Py_LIMITED_API 0x03050000
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
|
/* Xxo objects */
|
||||||
|
|
||||||
static PyObject *ErrorObject;
|
static PyObject *ErrorObject;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -93,9 +93,6 @@
|
||||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x030A0000</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
@ -93,9 +93,6 @@
|
||||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x03060000</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -1865,10 +1865,8 @@ class PyBuildExt(build_ext):
|
||||||
## self.add(Extension('xx', ['xxmodule.c']))
|
## self.add(Extension('xx', ['xxmodule.c']))
|
||||||
|
|
||||||
# Limited C API
|
# Limited C API
|
||||||
self.add(Extension('xxlimited', ['xxlimited.c'],
|
self.add(Extension('xxlimited', ['xxlimited.c']))
|
||||||
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')]))
|
|
||||||
|
|
||||||
def detect_tkinter_fromenv(self):
|
def detect_tkinter_fromenv(self):
|
||||||
# Build _tkinter using the Tcl/Tk locations specified by
|
# Build _tkinter using the Tcl/Tk locations specified by
|
||||||
|
|
Loading…
Reference in New Issue