Commit 2f4d0e9b authored by Marc-André Lemburg's avatar Marc-André Lemburg

Marc-Andre Lemburg <mal@lemburg.com>:

Added optimization proposed by Andrew Kuchling to the Unicode
matching macro.
parent e8d52af5
......@@ -168,7 +168,8 @@ typedef unsigned short Py_UNICODE;
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment