[Python-checkins] cpython: Fix PyUnicode_Partition(): str_in->str_obj
victor.stinner
python-checkins at python.org
Wed Oct 5 21:30:45 CEST 2011
http://hg.python.org/cpython/rev/891b0c54297d
changeset: 72704:891b0c54297d
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Wed Oct 05 20:58:25 2011 +0200
summary:
Fix PyUnicode_Partition(): str_in->str_obj
files:
Objects/unicodeobject.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -11694,12 +11694,12 @@
return NULL;
}
- kind1 = PyUnicode_KIND(str_in);
+ kind1 = PyUnicode_KIND(str_obj);
kind2 = PyUnicode_KIND(sep_obj);
- kind = kind1 > kind2 ? kind1 : kind2;
- buf1 = PyUnicode_DATA(str_in);
+ kind = Py_MAX(kind1, kind2);
+ buf1 = PyUnicode_DATA(str_obj);
if (kind1 != kind)
- buf1 = _PyUnicode_AsKind(str_in, kind);
+ buf1 = _PyUnicode_AsKind(str_obj, kind);
if (!buf1)
goto onError;
buf2 = PyUnicode_DATA(sep_obj);
@@ -11710,7 +11710,7 @@
len1 = PyUnicode_GET_LENGTH(str_obj);
len2 = PyUnicode_GET_LENGTH(sep_obj);
- switch(PyUnicode_KIND(str_in)) {
+ switch(PyUnicode_KIND(str_obj)) {
case PyUnicode_1BYTE_KIND:
out = ucs1lib_partition(str_obj, buf1, len1, sep_obj, buf2, len2);
break;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list