[Python-checkins] python/dist/src/Objects stringobject.c,2.174,2.175
unicodeobject.c,2.157,2.158
M.-A. Lemburg
mal@lemburg.com
Tue, 06 Aug 2002 20:51:14 +0200
bwarsaw@users.sourceforge.net wrote:
> Update of /cvsroot/python/python/dist/src/Objects
> In directory usw-pr-cvs1:/tmp/cvs-serv20648/Objects
>
> Modified Files:
> stringobject.c unicodeobject.c
> Log Message:
> Committing patch #591250 which provides "str1 in str2" when str1 is a
> string of longer than 1 character.
> ...
> ! end = lhs + (PyUnicode_GET_SIZE(u) - size);
> ! while (lhs <= end) {
> ! if (memcmp(lhs++, rhs, size) == 0) {
This doesn't take into account that sizeof(Py_UNICODE) == 2
or == 4.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/