Fixed Python C++ extension for Python 3.8.

Python 3.8 changed the meaning and type of the tp_print slot.
This commit is contained in:
Joshua Haberman 2020-11-20 13:20:55 -08:00
parent 284f4b6dd1
commit c2c13a558a
2 changed files with 2 additions and 2 deletions

View File

@ -567,7 +567,7 @@ PyTypeObject RepeatedCompositeContainer_Type = {
sizeof(RepeatedCompositeContainer), // tp_basicsize
0, // tp_itemsize
repeated_composite_container::Dealloc, // tp_dealloc
nullptr, // tp_print
0, // tp_print, in Python >=3.8: Py_ssize_t tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare

View File

@ -753,7 +753,7 @@ PyTypeObject RepeatedScalarContainer_Type = {
sizeof(RepeatedScalarContainer), // tp_basicsize
0, // tp_itemsize
repeated_scalar_container::Dealloc, // tp_dealloc
nullptr, // tp_print
0, // tp_print, in Python >=3.8: Py_ssize_t tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare