[Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.9,2.10
M.-A. Lemburg
python-dev@python.org
Sun, 18 Jun 2000 15:22:29 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv19395/Include
Modified Files:
unicodeobject.h
Log Message:
Marc-Andre Lemburg <mal@lemburg.com>:
Added optimization proposed by Andrew Kuchling to the Unicode
matching macro.
Index: unicodeobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -r2.9 -r2.10
*** unicodeobject.h 2000/05/09 19:51:53 2.9
--- unicodeobject.h 2000/06/18 22:22:27 2.10
***************
*** 169,173 ****
#define Py_UNICODE_MATCH(string, offset, substring)\
! (!memcmp((string)->str + (offset), (substring)->str,\
(substring)->length*sizeof(Py_UNICODE)))
--- 169,174 ----
#define Py_UNICODE_MATCH(string, offset, substring)\
! ((*((string)->str + (offset)) == *((substring)->str)) &&\
! !memcmp((string)->str + (offset), (substring)->str,\
(substring)->length*sizeof(Py_UNICODE)))