[issue22330] PyOS_mystricmp is broken

2014-09-03 Thread Masahiro Konishi
Masahiro Konishi added the comment: You can find PyOS_stricmp from here: https://docs.python.org/3/c-api/conversion.html And PyOS_stricmp is PyOS_mystricmp when MS_WINDOWS is not defined. Include/pystrcmp.h: #ifdef MS_WINDOWS #define PyOS_strnicmp strnicmp #define PyOS_stricmp stricmp #else

[issue22330] PyOS_mystricmp is broken

2014-09-03 Thread Masahiro Konishi
New submission from Masahiro Konishi: int x = PyOS_mystricmp("foo", "none"); expected: x < 0 actual: x == 0 while (*s1 && (tolower((unsigned)*s1++) == tolower((unsigned)*s2++))) { ; } return (tolower((unsigned)*s1) - tolower((unsigned)*s2