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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
3de4be40
Commit
3de4be40
authored
Jul 26, 2022
by
Sam Gross
Committed by
GitHub
Jul 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[0.29] Add configuration for the "nogil" CPython fork (GH-4912) (GH-4914)
parent
f1748bb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+50
-0
tests/compile/buildenv.pyx
tests/compile/buildenv.pyx
+2
-0
No files found.
Cython/Utility/ModuleSetupCode.c
View file @
3de4be40
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_NOGIL 0
#undef CYTHON_USE_TYPE_SLOTS
#undef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 0
#define CYTHON_USE_TYPE_SLOTS 0
...
@@ -91,6 +92,7 @@
...
@@ -91,6 +92,7 @@
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 1
#define CYTHON_COMPILING_IN_PYSTON 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_NOGIL 0
#ifndef CYTHON_USE_TYPE_SLOTS
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#define CYTHON_USE_TYPE_SLOTS 1
...
@@ -133,10 +135,58 @@
...
@@ -133,10 +135,58 @@
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
#endif
#endif
#elif defined(PY_NOGIL)
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_NOGIL 1
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#ifndef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 1
#endif
#ifndef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 1
#endif
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#else
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#define CYTHON_COMPILING_IN_CPYTHON 1
#define CYTHON_COMPILING_IN_NOGIL 0
#ifndef CYTHON_USE_TYPE_SLOTS
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#define CYTHON_USE_TYPE_SLOTS 1
...
...
tests/compile/buildenv.pyx
View file @
3de4be40
...
@@ -36,6 +36,7 @@ cdef extern from *:
...
@@ -36,6 +36,7 @@ cdef extern from *:
cdef
int
CYTHON_COMPILING_IN_CPYTHON
cdef
int
CYTHON_COMPILING_IN_CPYTHON
cdef
int
CYTHON_COMPILING_IN_PYPY
cdef
int
CYTHON_COMPILING_IN_PYPY
cdef
int
CYTHON_COMPILING_IN_PYSTON
cdef
int
CYTHON_COMPILING_IN_PYSTON
cdef
int
CYTHON_COMPILING_IN_NOGIL
cdef
int
CYTHON_USE_PYLONG_INTERNALS
cdef
int
CYTHON_USE_PYLONG_INTERNALS
cdef
int
CYTHON_USE_PYLIST_INTERNALS
cdef
int
CYTHON_USE_PYLIST_INTERNALS
cdef
int
CYTHON_USE_UNICODE_INTERNALS
cdef
int
CYTHON_USE_UNICODE_INTERNALS
...
@@ -78,6 +79,7 @@ PY_VERSION_HEX 0x{PY_VERSION_HEX:X}
...
@@ -78,6 +79,7 @@ PY_VERSION_HEX 0x{PY_VERSION_HEX:X}
CYTHON_COMPILING_IN_CPYTHON
{
CYTHON_COMPILING_IN_CPYTHON
}
CYTHON_COMPILING_IN_CPYTHON
{
CYTHON_COMPILING_IN_CPYTHON
}
CYTHON_COMPILING_IN_PYPY
{
CYTHON_COMPILING_IN_PYPY
}
CYTHON_COMPILING_IN_PYPY
{
CYTHON_COMPILING_IN_PYPY
}
CYTHON_COMPILING_IN_PYSTON
{
CYTHON_COMPILING_IN_PYSTON
}
CYTHON_COMPILING_IN_PYSTON
{
CYTHON_COMPILING_IN_PYSTON
}
CYTHON_COMPILING_IN_NOGIL
{
CYTHON_COMPILING_IN_NOGIL
}
CYTHON_USE_PYLONG_INTERNALS
{
CYTHON_USE_PYLONG_INTERNALS
}
CYTHON_USE_PYLONG_INTERNALS
{
CYTHON_USE_PYLONG_INTERNALS
}
CYTHON_USE_PYLIST_INTERNALS
{
CYTHON_USE_PYLIST_INTERNALS
}
CYTHON_USE_PYLIST_INTERNALS
{
CYTHON_USE_PYLIST_INTERNALS
}
...
...
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