Skip to content

Commit 489629f

Browse files
committed
Python 3.8 builtin tp_print initializer
Add missing initializer for tp_print added in python-3.8 when using -builtin Issue swig#1670
1 parent b7dec23 commit 489629f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Source/Modules/python.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4137,6 +4137,10 @@ class PYTHON:public Language {
41374137
Printv(f, "#if PY_VERSION_HEX >= 0x03080000\n", NIL);
41384138
printSlot(f, getSlot(n, "feature:python:tp_vectorcall"), "tp_vectorcall", "vectorcallfunc");
41394139
Printv(f, "#endif\n", NIL);
4140+
Printv(f, "#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)\n", NIL);
4141+
printSlot(f, getSlot(), "tp_print");
4142+
Printv(f, "#endif\n", NIL);
4143+
41404144
Printv(f, "#ifdef COUNT_ALLOCS\n", NIL);
41414145
printSlot(f, getSlot(n, "feature:python:tp_allocs"), "tp_allocs", "Py_ssize_t");
41424146
printSlot(f, getSlot(n, "feature:python:tp_frees"), "tp_frees", "Py_ssize_t");

0 commit comments

Comments
 (0)