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
751532a5
Commit
751532a5
authored
Dec 05, 2021
by
da-woods
Committed by
GitHub
Dec 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tp_inline_values_offset to slot_table (GH-4472)
To remove a compiler warning since this slot was added in 3.11a2.
parent
146f2c0e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
29 deletions
+63
-29
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+1
-0
Cython/Utility/AsyncGen.c
Cython/Utility/AsyncGen.c
+34
-22
Cython/Utility/Coroutine.c
Cython/Utility/Coroutine.c
+20
-5
Cython/Utility/CythonFunction.c
Cython/Utility/CythonFunction.c
+8
-2
No files found.
Cython/Compiler/TypeSlots.py
View file @
751532a5
...
...
@@ -1064,6 +1064,7 @@ class SlotTable(object):
EmptySlot
(
"tp_finalize"
,
ifdef
=
"PY_VERSION_HEX >= 0x030400a1"
),
EmptySlot
(
"tp_vectorcall"
,
ifdef
=
"PY_VERSION_HEX >= 0x030800b1"
),
EmptySlot
(
"tp_print"
,
ifdef
=
"PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000"
),
EmptySlot
(
"tp_inline_values_offset"
,
ifdef
=
"PY_VERSION_HEX >= 0x030B00A2"
),
# PyPy specific extension - only here to avoid C compiler warnings.
EmptySlot
(
"tp_pypy_flags"
,
ifdef
=
"CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000"
),
)
...
...
Cython/Utility/AsyncGen.c
View file @
751532a5
...
...
@@ -400,11 +400,11 @@ static PyTypeObject __pyx_AsyncGenType_type = {
0
,
/* tp_getattr */
0
,
/* tp_setattr */
#if CYTHON_USE_ASYNC_SLOTS
&
__Pyx_async_gen_as_async
,
/* tp_as_async */
&
__Pyx_async_gen_as_async
,
/* tp_as_async */
#else
0
,
/*tp_reserved*/
#endif
(
reprfunc
)
__Pyx_async_gen_repr
,
/* tp_repr */
(
reprfunc
)
__Pyx_async_gen_repr
,
/* tp_repr */
0
,
/* tp_as_number */
0
,
/* tp_as_sequence */
0
,
/* tp_as_mapping */
...
...
@@ -417,20 +417,20 @@ static PyTypeObject __pyx_AsyncGenType_type = {
Py_TPFLAGS_DEFAULT
|
Py_TPFLAGS_HAVE_GC
|
Py_TPFLAGS_HAVE_FINALIZE
,
/* tp_flags */
0
,
/* tp_doc */
(
traverseproc
)
__Pyx_async_gen_traverse
,
/* tp_traverse */
(
traverseproc
)
__Pyx_async_gen_traverse
,
/* tp_traverse */
0
,
/* tp_clear */
#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1
// in order to (mis-)use tp_reserved above, we must also implement tp_richcompare
__Pyx_Coroutine_compare
,
/*tp_richcompare*/
__Pyx_Coroutine_compare
,
/*tp_richcompare*/
#else
0
,
/*tp_richcompare*/
0
,
/*tp_richcompare*/
#endif
offsetof
(
__pyx_CoroutineObject
,
gi_weakreflist
),
/* tp_weaklistoffset */
0
,
/* tp_iter */
0
,
/* tp_iternext */
__Pyx_async_gen_methods
,
/* tp_methods */
__Pyx_async_gen_memberlist
,
/* tp_members */
__Pyx_async_gen_getsetlist
,
/* tp_getset */
__Pyx_async_gen_methods
,
/* tp_methods */
__Pyx_async_gen_memberlist
,
/* tp_members */
__Pyx_async_gen_getsetlist
,
/* tp_getset */
0
,
/* tp_base */
0
,
/* tp_dict */
0
,
/* tp_descr_get */
...
...
@@ -447,9 +447,9 @@ static PyTypeObject __pyx_AsyncGenType_type = {
0
,
/* tp_subclasses */
0
,
/* tp_weaklist */
#if CYTHON_USE_TP_FINALIZE
0
,
/*tp_del*/
0
,
/*tp_del*/
#else
__Pyx_Coroutine_del
,
/*tp_del*/
__Pyx_Coroutine_del
,
/*tp_del*/
#endif
0
,
/* tp_version_tag */
#if CYTHON_USE_TP_FINALIZE
...
...
@@ -463,6 +463,9 @@ static PyTypeObject __pyx_AsyncGenType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
#endif
...
...
@@ -668,15 +671,15 @@ static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_asend_as_async = {
static
PyTypeObject
__pyx__PyAsyncGenASendType_type
=
{
PyVarObject_HEAD_INIT
(
0
,
0
)
"async_generator_asend"
,
/* tp_name */
sizeof
(
__pyx_PyAsyncGenASend
),
/* tp_basicsize */
sizeof
(
__pyx_PyAsyncGenASend
),
/* tp_basicsize */
0
,
/* tp_itemsize */
/* methods */
(
destructor
)
__Pyx_async_gen_asend_dealloc
,
/* tp_dealloc */
(
destructor
)
__Pyx_async_gen_asend_dealloc
,
/* tp_dealloc */
0
,
/* tp_vectorcall_offset */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
#if CYTHON_USE_ASYNC_SLOTS
&
__Pyx_async_gen_asend_as_async
,
/* tp_as_async */
&
__Pyx_async_gen_asend_as_async
,
/* tp_as_async */
#else
0
,
/*tp_reserved*/
#endif
...
...
@@ -696,14 +699,14 @@ static PyTypeObject __pyx__PyAsyncGenASendType_type = {
0
,
/* tp_clear */
#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1
// in order to (mis-)use tp_reserved above, we must also implement tp_richcompare
__Pyx_Coroutine_compare
,
/*tp_richcompare*/
__Pyx_Coroutine_compare
,
/*tp_richcompare*/
#else
0
,
/*tp_richcompare*/
0
,
/*tp_richcompare*/
#endif
0
,
/* tp_weaklistoffset */
PyObject_SelfIter
,
/* tp_iter */
(
iternextfunc
)
__Pyx_async_gen_asend_iternext
,
/* tp_iternext */
__Pyx_async_gen_asend_methods
,
/* tp_methods */
__Pyx_async_gen_asend_methods
,
/* tp_methods */
0
,
/* tp_members */
0
,
/* tp_getset */
0
,
/* tp_base */
...
...
@@ -732,6 +735,9 @@ static PyTypeObject __pyx__PyAsyncGenASendType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
#endif
...
...
@@ -867,6 +873,9 @@ static PyTypeObject __pyx__PyAsyncGenWrappedValueType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
#endif
...
...
@@ -1142,14 +1151,14 @@ static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_athrow_as_async = {
static
PyTypeObject
__pyx__PyAsyncGenAThrowType_type
=
{
PyVarObject_HEAD_INIT
(
0
,
0
)
"async_generator_athrow"
,
/* tp_name */
sizeof
(
__pyx_PyAsyncGenAThrow
),
/* tp_basicsize */
sizeof
(
__pyx_PyAsyncGenAThrow
),
/* tp_basicsize */
0
,
/* tp_itemsize */
(
destructor
)
__Pyx_async_gen_athrow_dealloc
,
/* tp_dealloc */
(
destructor
)
__Pyx_async_gen_athrow_dealloc
,
/* tp_dealloc */
0
,
/* tp_vectorcall_offset */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
#if CYTHON_USE_ASYNC_SLOTS
&
__Pyx_async_gen_athrow_as_async
,
/* tp_as_async */
&
__Pyx_async_gen_athrow_as_async
,
/* tp_as_async */
#else
0
,
/*tp_reserved*/
#endif
...
...
@@ -1169,14 +1178,14 @@ static PyTypeObject __pyx__PyAsyncGenAThrowType_type = {
0
,
/* tp_clear */
#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1
// in order to (mis-)use tp_reserved above, we must also implement tp_richcompare
__Pyx_Coroutine_compare
,
/*tp_richcompare*/
__Pyx_Coroutine_compare
,
/*tp_richcompare*/
#else
0
,
/*tp_richcompare*/
0
,
/*tp_richcompare*/
#endif
0
,
/* tp_weaklistoffset */
PyObject_SelfIter
,
/* tp_iter */
(
iternextfunc
)
__Pyx_async_gen_athrow_iternext
,
/* tp_iternext */
__Pyx_async_gen_athrow_methods
,
/* tp_methods */
__Pyx_async_gen_athrow_methods
,
/* tp_methods */
0
,
/* tp_members */
0
,
/* tp_getset */
0
,
/* tp_base */
...
...
@@ -1205,6 +1214,9 @@ static PyTypeObject __pyx__PyAsyncGenAThrowType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
#endif
...
...
Cython/Utility/Coroutine.c
View file @
751532a5
...
...
@@ -1622,8 +1622,11 @@ static PyTypeObject __pyx_CoroutineAwaitType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
0
,
/*tp_pypy_flags*/
#endif
};
#endif
/* CYTHON_USE_TYPE_SPECS */
...
...
@@ -1811,8 +1814,11 @@ static PyTypeObject __pyx_CoroutineType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
0
,
/*tp_pypy_flags*/
#endif
};
#endif
/* CYTHON_USE_TYPE_SPECS */
...
...
@@ -1961,8 +1967,11 @@ static PyTypeObject __pyx_IterableCoroutineType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
0
,
/*tp_pypy_flags*/
#endif
};
#endif
/* CYTHON_USE_TYPE_SPECS */
...
...
@@ -2107,8 +2116,11 @@ static PyTypeObject __pyx_GeneratorType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
0
,
/*tp_pypy_flags*/
#endif
};
#endif
/* CYTHON_USE_TYPE_SPECS */
...
...
@@ -2515,8 +2527,11 @@ static PyTypeObject __Pyx__PyExc_StopAsyncIteration_type = {
#if PY_VERSION_HEX >= 0x030400a1
0
,
/*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
0
,
/*tp_pypy_flags*/
#endif
};
#endif
...
...
Cython/Utility/CythonFunction.c
View file @
751532a5
...
...
@@ -1037,8 +1037,11 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
0
,
/*tp_pypy_flags*/
#endif
};
#endif
/* CYTHON_USE_TYPE_SPECS */
...
...
@@ -1578,8 +1581,11 @@ static PyTypeObject __pyx_FusedFunctionType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0
,
/*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030B00A2
0
,
/*tp_inline_values_offset*/
#endif
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
0
,
/*tp_pypy_flags*/
0
,
/*tp_pypy_flags*/
#endif
};
#endif
...
...
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