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
24fe4608
Commit
24fe4608
authored
Aug 17, 2019
by
shireenrao
Committed by
Steve Dower
Aug 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-36266: Add module name in ImportError when DLL not found on Windows (GH-15180)
parent
45585639
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
Misc/NEWS.d/next/Windows/2019-08-08-18-05-27.bpo-36266.x4eZU3.rst
...S.d/next/Windows/2019-08-08-18-05-27.bpo-36266.x4eZU3.rst
+1
-0
Python/dynload_win.c
Python/dynload_win.c
+4
-4
No files found.
Misc/NEWS.d/next/Windows/2019-08-08-18-05-27.bpo-36266.x4eZU3.rst
0 → 100644
View file @
24fe4608
Add the module name in the formatted error message when DLL load fail happens during module import in ``_PyImport_FindSharedFuncptrWindows()``. Patch by Srinivas Nyayapati.
\ No newline at end of file
Python/dynload_win.c
View file @
24fe4608
...
...
@@ -240,8 +240,8 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
This should not happen if called correctly. */
if
(
theLength
==
0
)
{
message
=
PyUnicode_FromFormat
(
"DLL load failed with error code %u"
,
errorCode
);
"DLL load failed with error code %u
while importing %s
"
,
errorCode
,
shortname
);
}
else
{
/* For some reason a \r\n
is appended to the text */
...
...
@@ -251,8 +251,8 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
theLength
-=
2
;
theInfo
[
theLength
]
=
'\0'
;
}
message
=
PyUnicode_From
String
(
"DLL load failed
: "
);
message
=
PyUnicode_From
Format
(
"DLL load failed
while importing %s: "
,
shortname
);
PyUnicode_AppendAndDel
(
&
message
,
PyUnicode_FromWideChar
(
...
...
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