summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2019-06-07 16:31:23 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2019-06-16 15:50:23 +0200
commitbbe2e94bb66b5e263655083dd6ed6bb878e21b74 (patch)
tree08058a271f7c179ae8295faacdc95d2a61e41700
parente4e241d2bdd470ade220d412f3b58fb40fdedc16 (diff)
downloadpygobject-bbe2e94bb66b5e263655083dd6ed6bb878e21b74.tar.gz
Don't use PyTypeObject.tp_print with Python 3
It was only used with Python 2 and unused/reserved with Python 3. Python 3.8 has renamed the slot and is now using it for something different which breaks our build.
-rw-r--r--gi/pygobject-object.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gi/pygobject-object.c b/gi/pygobject-object.c
index dbf46e1e..39c03ca3 100644
--- a/gi/pygobject-object.c
+++ b/gi/pygobject-object.c
@@ -878,7 +878,10 @@ pygobject_inherit_slots(PyTypeObject *type, PyObject *bases, gboolean check_for_
offsetof(PyTypeObject, tp_iter),
offsetof(PyTypeObject, tp_repr),
offsetof(PyTypeObject, tp_str),
- offsetof(PyTypeObject, tp_print) };
+#if PY_VERSION_HEX < 0x03000000
+ offsetof(PyTypeObject, tp_print),
+#endif
+ };
gsize i;
/* Happens when registering gobject.GObject itself, at least. */