]> granicus.if.org Git - python/commitdiff
Fix post-condition in unicode_repr(): check the result, not the input
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 5 Oct 2011 23:13:58 +0000 (01:13 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 5 Oct 2011 23:13:58 +0000 (01:13 +0200)
Objects/unicodeobject.c

index a0d3056b7f7a9e04ac7311a1388b88ad6d5a2dc8..98da9b304de2fe32bfa8a5c66acde3e30260c6ab 100644 (file)
@@ -11589,7 +11589,7 @@ unicode_repr(PyObject *unicode)
         }
     }
     /* Closing quote already added at the beginning */
-    assert(_PyUnicode_CheckConsistency(unicode, 1));
+    assert(_PyUnicode_CheckConsistency(repr, 1));
     return repr;
 }