Changeset 388 for python/vendor/current/Python/pystrcmp.c
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Python/pystrcmp.c
r2 r388 7 7 PyOS_mystrnicmp(const char *s1, const char *s2, Py_ssize_t size) 8 8 { 9 10 11 12 13 14 15 16 9 if (size == 0) 10 return 0; 11 while ((--size > 0) && 12 (tolower((unsigned)*s1) == tolower((unsigned)*s2))) { 13 if (!*s1++ || !*s2++) 14 break; 15 } 16 return tolower((unsigned)*s1) - tolower((unsigned)*s2); 17 17 } 18 18 … … 20 20 PyOS_mystricmp(const char *s1, const char *s2) 21 21 { 22 23 24 25 22 while (*s1 && (tolower((unsigned)*s1++) == tolower((unsigned)*s2++))) { 23 ; 24 } 25 return (tolower((unsigned)*s1) - tolower((unsigned)*s2)); 26 26 }
Note:
See TracChangeset
for help on using the changeset viewer.