[Python-checkins] cpython: test_widechar() uses the new Unicode API

victor.stinner python-checkins at python.org
Mon Nov 21 02:14:56 CET 2011


http://hg.python.org/cpython/rev/893b16723c9f
changeset:   73651:893b16723c9f
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Mon Nov 21 02:06:57 2011 +0100
summary:
  test_widechar() uses the new Unicode API

PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()

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


diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -1425,7 +1425,7 @@
         return NULL;
     }
 
-    if (PyUnicode_GET_SIZE(wide) != PyUnicode_GET_SIZE(utf8)) {
+    if (PyUnicode_GET_LENGTH(wide) != PyUnicode_GET_LENGTH(utf8)) {
         Py_DECREF(wide);
         Py_DECREF(utf8);
         return raiseTestError("test_widechar",

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


More information about the Python-checkins mailing list