[Python-checkins] python/dist/src/Objects unicodeobject.c,2.144,2.145

tim_one@sourceforge.net tim_one@sourceforge.net
Mon, 22 Apr 2002 12:00:14 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv30166/python/Objects

Modified Files:
	unicodeobject.c 
Log Message:
unicode_memchr():  Squashed gratuitous int-vs-size_t mismatch (which
gives a compiler wng under MSVC because of the resulting signed-vs-
unsigned comparison).


Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.144
retrieving revision 2.145
diff -C2 -d -r2.144 -r2.145
*** unicodeobject.c	22 Apr 2002 17:42:37 -0000	2.144
--- unicodeobject.c	22 Apr 2002 19:00:10 -0000	2.145
***************
*** 4448,4454 ****
  unicode_memchr(const Py_UNICODE *s, Py_UNICODE c, size_t n)
  {
! 	int i;
! 	for (i = 0; i<n; ++i)
! 		if (s[i]==c)
  			return s+i;
  	return NULL;
--- 4448,4454 ----
  unicode_memchr(const Py_UNICODE *s, Py_UNICODE c, size_t n)
  {
! 	size_t i;
! 	for (i = 0; i < n; ++i)
! 		if (s[i] == c)
  			return s+i;
  	return NULL;