[Python-checkins] cpython (2.7): when you enter repr, you must leave, too (#25455)

benjamin.peterson python-checkins at python.org
Sat Dec 3 14:30:11 EST 2016


https://hg.python.org/cpython/rev/ea1edf1bf362
changeset: 105428:ea1edf1bf362
branch: 2.7
user: Benjamin Peterson <benjamin at python.org>
date: Sat Dec 03 11:30:04 2016 -0800
summary:
 when you enter repr, you must leave, too (#25455)
files:
 Modules/_elementtree.c | 1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -1236,6 +1236,7 @@
 
 repr = PyString_FromFormat("<Element %s at %p>",
 PyString_AS_STRING(tag), self);
+ Py_ReprLeave((PyObject *)self);
 Py_DECREF(tag);
 return repr;
 }
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /