[Python-checkins] cpython: Fix post-condition in unicode_repr(): check the result, not the input

victor.stinner python-checkins at python.org
Thu Oct 6 01:51:01 CEST 2011


http://hg.python.org/cpython/rev/18e5c247c625
changeset:   72713:18e5c247c625
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Thu Oct 06 01:13:58 2011 +0200
summary:
  Fix post-condition in unicode_repr(): check the result, not the input

files:
  Objects/unicodeobject.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -11589,7 +11589,7 @@
         }
     }
     /* Closing quote already added at the beginning */
-    assert(_PyUnicode_CheckConsistency(unicode, 1));
+    assert(_PyUnicode_CheckConsistency(repr, 1));
     return repr;
 }
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list