Python 3.8 builtin tp_print initializer

Add missing initializer for tp_print added in python-3.8
when using -builtin

Issue #1670
This commit is contained in:
William S Fulton 2020-01-05 22:40:41 +00:00
commit 489629fd53

View file

@ -4137,6 +4137,10 @@ public:
Printv(f, "#if PY_VERSION_HEX >= 0x03080000\n", NIL);
printSlot(f, getSlot(n, "feature:python:tp_vectorcall"), "tp_vectorcall", "vectorcallfunc");
Printv(f, "#endif\n", NIL);
Printv(f, "#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)\n", NIL);
printSlot(f, getSlot(), "tp_print");
Printv(f, "#endif\n", NIL);
Printv(f, "#ifdef COUNT_ALLOCS\n", NIL);
printSlot(f, getSlot(n, "feature:python:tp_allocs"), "tp_allocs", "Py_ssize_t");
printSlot(f, getSlot(n, "feature:python:tp_frees"), "tp_frees", "Py_ssize_t");