diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-04-25 21:54:00 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-04-25 21:54:00 (GMT) |
commit | a23831ff44e0178006a0039d218d60252d5bd755 (patch) | |
tree | 1c9d47614cdbb2466bc164755205cef66728bf10 /Objects | |
parent | 80b09d49c147e202f5e2a82b6b30ddb8454d10e9 (diff) | |
download | cpython-a23831ff44e0178006a0039d218d60252d5bd755.zip cpython-a23831ff44e0178006a0039d218d60252d5bd755.tar.gz cpython-a23831ff44e0178006a0039d218d60252d5bd755.tar.bz2 |
condense condition
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index ae401a6..3851008 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -6784,10 +6784,7 @@ PyUnicode_CompareWithASCIIString(PyObject* uni, const char* str) 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 */ |