projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cf64fd
)
Clear tp_print for cdef classes.
author
Robert Bradshaw
<robertwb@gmail.com>
Sat, 2 Nov 2013 03:31:38 +0000
(20:31 -0700)
committer
Robert Bradshaw
<robertwb@gmail.com>
Sat, 2 Nov 2013 03:31:38 +0000
(20:31 -0700)
Cython/Compiler/ModuleNode.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ModuleNode.py
b/Cython/Compiler/ModuleNode.py
index
88e6ae0
..
49b61e0
100644
(file)
--- a/
Cython/Compiler/ModuleNode.py
+++ b/
Cython/Compiler/ModuleNode.py
@@
-2514,6
+2514,9
@@
class ModuleNode(Nodes.Node, Nodes.BlockNode):
"if (PyType_Ready(&%s) < 0) %s" % (
typeobj_cname,
code.error_goto(entry.pos)))
+ # Don't inherit tp_dict from builting types, restoring the
+ # behavior of using tp_repr or tp_str instead.
+ code.putln("%s.tp_print = 0;" % typeobj_cname)
# Fix special method docstrings. This is a bit of a hack, but
# unless we let PyType_Ready create the slot wrappers we have
# a significant performance hit. (See trac #561.)