summaryrefslogtreecommitdiffstats
path: root/Python/dynload_win.c
diff options
context:
space:
mode:
authorMinmin Gong <gongminmin@msn.com>2019-07-13 13:11:43 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-07-13 13:11:43 (GMT)
commit05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5 (patch)
tree44b38c79d0706be2530936685a8ed9a410f2e161 /Python/dynload_win.c
parentb5bbb8a740eaf46c78d122185de8b072e9deea2a (diff)
downloadcpython-05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5.zip
cpython-05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5.tar.gz
cpython-05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5.tar.bz2
bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)
Diffstat (limited to 'Python/dynload_win.c')
-rw-r--r--Python/dynload_win.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index 457d47f..5096555 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
@@ -38,24 +38,6 @@ const char *_PyImport_DynLoadFiletab[] = {
NULL
};
-/* Case insensitive string compare, to avoid any dependencies on particular
- C RTL implementations */
-
-static int strcasecmp (const char *string1, const char *string2)
-{
- int first, second;
-
- do {
- first = tolower(*string1);
- second = tolower(*string2);
- string1++;
- string2++;
- } while (first && first == second);
-
- return (first - second);
-}
-
-
/* Function to return the name of the "python" DLL that the supplied module
directly imports. Looks through the list of imported modules and
returns the first entry that starts with "python" (case sensitive) and
@@ -297,7 +279,7 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
import_python = GetPythonImport(hDLL);
if (import_python &&
- strcasecmp(buffer,import_python)) {
+ _stricmp(buffer,import_python)) {
PyErr_Format(PyExc_ImportError,
"Module use of %.150s conflicts "
"with this version of Python.",