Commit b28b849b authored by Stefan Behnel's avatar Stefan Behnel

Do not reset "tp_print" for builtin types in Py3 at all anymore. It was never...

Do not reset "tp_print" for builtin types in Py3 at all anymore. It was never needed there (only in Py2) and not gets in the way in Py3.8/9.
parent 9c5679d6
...@@ -5034,10 +5034,10 @@ class CClassDefNode(ClassDefNode): ...@@ -5034,10 +5034,10 @@ class CClassDefNode(ClassDefNode):
readyfunc, readyfunc,
typeobj_cname, typeobj_cname,
code.error_goto(entry.pos))) code.error_goto(entry.pos)))
# Don't inherit tp_print from builtin types, restoring the # Don't inherit tp_print from builtin types in Python 2, restoring the
# behavior of using tp_repr or tp_str instead. # behavior of using tp_repr or tp_str instead.
# ("tp_print" was renamed to "tp_vectorcall_offset" in Py3.8b1) # ("tp_print" was renamed to "tp_vectorcall_offset" in Py3.8b1)
code.putln("#if PY_VERSION_HEX < 0x030800B1") code.putln("#if PY_MAJOR_VERSION < 3")
code.putln("%s.tp_print = 0;" % typeobj_cname) code.putln("%s.tp_print = 0;" % typeobj_cname)
code.putln("#endif") code.putln("#endif")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment