Skip to content

bpo-41111: xxlimited.c defines Py_LIMITED_API #25151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Modules/xxlimited.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
pass
*/

#define Py_LIMITED_API 0x030a0000

#include "Python.h"

// Module state
Expand Down
4 changes: 3 additions & 1 deletion Modules/xxlimited_35.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
* See the xxlimited module for an extension module template.
*/

/* Xxo objects */
#define Py_LIMITED_API 0x03050000

#include "Python.h"

/* Xxo objects */

static PyObject *ErrorObject;

typedef struct {
Expand Down
3 changes: 0 additions & 3 deletions PCbuild/xxlimited.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x030A0000</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
Expand Down
3 changes: 0 additions & 3 deletions PCbuild/xxlimited_35.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x03060000</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1865,10 +1865,8 @@ def detect_modules(self):
## self.add(Extension('xx', ['xxmodule.c']))

# Limited C API
self.add(Extension('xxlimited', ['xxlimited.c'],
define_macros=[('Py_LIMITED_API', '0x030a0000')]))
self.add(Extension('xxlimited_35', ['xxlimited_35.c'],
define_macros=[('Py_LIMITED_API', '0x03050000')]))
self.add(Extension('xxlimited', ['xxlimited.c']))
self.add(Extension('xxlimited_35', ['xxlimited_35.c']))

def detect_tkinter_fromenv(self):
# Build _tkinter using the Tcl/Tk locations specified by
Expand Down