bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095) · python/cpython@920ec4b (original) (raw)
`@@ -38,24 +38,6 @@ const char *_PyImport_DynLoadFiletab[] = {
`
38
38
`NULL
`
39
39
`};
`
40
40
``
41
``
`-
/* Case insensitive string compare, to avoid any dependencies on particular
`
42
``
`-
C RTL implementations */
`
43
``
-
44
``
`-
static int strcasecmp (const char *string1, const char *string2)
`
45
``
`-
{
`
46
``
`-
int first, second;
`
47
``
-
48
``
`-
do {
`
49
``
`-
first = tolower(*string1);
`
50
``
`-
second = tolower(*string2);
`
51
``
`-
string1++;
`
52
``
`-
string2++;
`
53
``
`-
} while (first && first == second);
`
54
``
-
55
``
`-
return (first - second);
`
56
``
`-
}
`
57
``
-
58
``
-
59
41
`/* Function to return the name of the "python" DLL that the supplied module
`
60
42
` directly imports. Looks through the list of imported modules and
`
61
43
` returns the first entry that starts with "python" (case sensitive) and
`
`@@ -297,7 +279,7 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
`
297
279
`import_python = GetPythonImport(hDLL);
`
298
280
``
299
281
`if (import_python &&
`
300
``
`-
strcasecmp(buffer,import_python)) {
`
``
282
`+
_stricmp(buffer,import_python)) {
`
301
283
`PyErr_Format(PyExc_ImportError,
`
302
284
`"Module use of %.150s conflicts "
`
303
285
`"with this version of Python.",
`