Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
05f2d84c
Commit
05f2d84c
authored
Jul 13, 2019
by
Minmin Gong
Committed by
Serhiy Storchaka
Jul 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)
parent
b5bbb8a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
19 deletions
+2
-19
Misc/NEWS.d/next/Windows/2019-05-05-05-23-34.bpo-28269.-MOHI7.rst
...S.d/next/Windows/2019-05-05-05-23-34.bpo-28269.-MOHI7.rst
+1
-0
Python/dynload_win.c
Python/dynload_win.c
+1
-19
No files found.
Misc/NEWS.d/next/Windows/2019-05-05-05-23-34.bpo-28269.-MOHI7.rst
0 → 100644
View file @
05f2d84c
Replace use of :c:func:`strcasecmp` for the system function :c:func:`_stricmp`. Patch by Minmin Gong.
Python/dynload_win.c
View file @
05f2d84c
...
...
@@ -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
&&
strcase
cmp
(
buffer
,
import_python
))
{
_stri
cmp
(
buffer
,
import_python
))
{
PyErr_Format
(
PyExc_ImportError
,
"Module use of %.150s conflicts "
"with this version of Python."
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment