Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
0c01ea5d
Commit
0c01ea5d
authored
Apr 10, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare automatically setting Py_LIMITED_API (once it's ready).
parent
0f03e47d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-0
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+13
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
0c01ea5d
...
...
@@ -665,7 +665,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
json
.
dumps
(
metadata
,
indent
=
4
,
sort_keys
=
True
))
code
.
putln
(
"END: Cython Metadata */"
)
code
.
putln
(
""
)
code
.
putln
(
"#define PY_SSIZE_T_CLEAN"
)
self
.
_put_setup_code
(
code
,
"InitLimitedAPI"
)
for
inc
in
sorted
(
env
.
c_includes
.
values
(),
key
=
IncludeCode
.
sortkey
):
if
inc
.
location
==
inc
.
INITIAL
:
...
...
Cython/Utility/ModuleSetupCode.c
View file @
0c01ea5d
/////////////// InitLimitedAPI ///////////////
#if defined(CYTHON_LIMITED_API) && 0
/* disabled: enabling Py_LIMITED_API needs more work */
#ifndef Py_LIMITED_API
#if CYTHON_LIMITED_API+0 > 0
#define Py_LIMITED_API CYTHON_LIMITED_API
#else
#define Py_LIMITED_API 0x03030000
#endif
#endif
#endif
/////////////// CModulePreamble ///////////////
#include <stddef.h>
/* For offsetof */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment