Commit f10a0a39 authored by Stefan Behnel's avatar Stefan Behnel

Fix compile errors in CPython 3.8b1 due to the tp_print/tp_vectorcall slots.

Closes GH-2976.
parent bfe60761
......@@ -2,6 +2,16 @@
Cython Changelog
================
0.29.10 (2019-06-0?)
====================
Bugs fixed
----------
* Fix compile errors in CPython 3.8b1 due to the new "tp_vectorcall" slots.
(Github issue #2976)
0.29.9 (2019-05-29)
===================
......
......@@ -4898,7 +4898,10 @@ class CClassDefNode(ClassDefNode):
code.error_goto(entry.pos)))
# Don't inherit tp_print from builtin types, restoring the
# behavior of using tp_repr or tp_str instead.
# ("tp_print" was renamed to "tp_vectorcall_offset" in Py3.8b1)
code.putln("#if PY_VERSION_HEX < 0x030800B1")
code.putln("%s.tp_print = 0;" % typeobj_cname)
code.putln("#endif")
# Use specialised attribute lookup for types with generic lookup but no instance dict.
getattr_slot_func = TypeSlots.get_slot_code_by_name(scope, 'tp_getattro')
......
......@@ -887,6 +887,7 @@ slot_table = (
EmptySlot("tp_del"),
EmptySlot("tp_version_tag"),
EmptySlot("tp_finalize", ifdef="PY_VERSION_HEX >= 0x030400a1"),
EmptySlot("tp_vectorcall", ifdef="PY_VERSION_HEX >= 0x030800b1"),
)
#------------------------------------------------------------------------------------------
......
......@@ -421,6 +421,9 @@ static PyTypeObject __pyx_AsyncGenType_type = {
#elif PY_VERSION_HEX >= 0x030400a1
0, /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
......@@ -650,6 +653,9 @@ static PyTypeObject __pyx__PyAsyncGenASendType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0, /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
......@@ -759,6 +765,9 @@ static PyTypeObject __pyx__PyAsyncGenWrappedValueType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0, /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
......@@ -1038,6 +1047,9 @@ static PyTypeObject __pyx__PyAsyncGenAThrowType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0, /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
......
......@@ -1497,6 +1497,9 @@ static PyTypeObject __pyx_CoroutineAwaitType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
#if PY_VERSION_HEX < 0x030500B1 || defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS
......@@ -1655,6 +1658,9 @@ static PyTypeObject __pyx_CoroutineType_type = {
#elif PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
static int __pyx_Coroutine_init(void) {
......@@ -1760,6 +1766,9 @@ static PyTypeObject __pyx_IterableCoroutineType_type = {
#if PY_VERSION_HEX >= 0x030400a1
__Pyx_Coroutine_del, /*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
......@@ -1860,6 +1869,9 @@ static PyTypeObject __pyx_GeneratorType_type = {
#elif PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
static int __pyx_Generator_init(void) {
......
......@@ -730,6 +730,9 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
......@@ -1203,6 +1206,9 @@ static PyTypeObject __pyx_FusedFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
};
static int __pyx_FusedFunction_init(void) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment