[Python-checkins] r80485 - python/branches/py3k/Objects/unicodeobject.c
benjamin.peterson
python-checkins at python.org
Sun Apr 25 23:54:00 CEST 2010
Author: benjamin.peterson
Date: Sun Apr 25 23:54:00 2010
New Revision: 80485
Log:
condense condition
Modified:
python/branches/py3k/Objects/unicodeobject.c
Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c (original)
+++ python/branches/py3k/Objects/unicodeobject.c Sun Apr 25 23:54:00 2010
@@ -6784,10 +6784,7 @@
return ((int)id[i] < (int)str[i]) ? -1 : 1;
/* This check keeps Python strings that end in '\0' from comparing equal
to C strings identical up to that point. */
- if (PyUnicode_GET_SIZE(uni) != i)
- /* We'll say the Python string is longer. */
- return 1;
- if (id[i])
+ if (PyUnicode_GET_SIZE(uni) != i || id[i])
return 1; /* uni is longer */
if (str[i])
return -1; /* str is longer */
More information about the Python-checkins
mailing list