Mercurial > cpython-lru_cache-weakref
diff Include/unicodeobject.h @ 12956:dc0a212fb353 legacy-trunk
Marc-Andre Lemburg <mal@lemburg.com>:
Added optimization proposed by Andrew Kuchling to the Unicode
matching macro.
| author | Marc-André Lemburg <mal@egenix.com> |
|---|---|
| date | Sun, 18 Jun 2000 22:22:27 +0000 |
| parents | 06ff966f69d5 |
| children | 67a04816ea50 |
line wrap: on
line diff
--- a/Include/unicodeobject.h Sun Jun 18 20:27:10 2000 +0000 +++ b/Include/unicodeobject.h Sun Jun 18 22:22:27 2000 +0000 @@ -168,7 +168,8 @@ while (0) #define Py_UNICODE_MATCH(string, offset, substring)\ - (!memcmp((string)->str + (offset), (substring)->str,\ + ((*((string)->str + (offset)) == *((substring)->str)) &&\ + !memcmp((string)->str + (offset), (substring)->str,\ (substring)->length*sizeof(Py_UNICODE))) #ifdef __cplusplus
