Fixed Python C++ extension for Python 3.8.

Python 3.8 changed the meaning and type of the tp_print slot.
pull/8076/head
Joshua Haberman 4 years ago
parent 284f4b6dd1
commit c2c13a558a
  1. 2
      python/google/protobuf/pyext/repeated_composite_container.cc
  2. 2
      python/google/protobuf/pyext/repeated_scalar_container.cc

@ -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

@ -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

Loading…
Cancel
Save