projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1263d5
)
bpo-20443: Fix calculate_program_full_path() warning (GH-14446)
author
Victor Stinner
<vstinner@redhat.com>
Fri, 28 Jun 2019 14:49:38 +0000
(16:49 +0200)
committer
GitHub
<noreply@github.com>
Fri, 28 Jun 2019 14:49:38 +0000
(16:49 +0200)
Don't call _Py_isabs() with a bytes string (char*), the function
expects as wide string.
Modules/getpath.c
patch
|
blob
|
history
diff --git
a/Modules/getpath.c
b/Modules/getpath.c
index 751c0b79e8fafa9c4e3226b27a4b16358fedec68..4ddb6638fa855e2b05a9b5ff8991ad600dbec439 100644
(file)
--- a/
Modules/getpath.c
+++ b/
Modules/getpath.c
@@
-761,7
+761,7
@@
calculate_program_full_path(const PyConfig *config,
* absolutize() should help us out below
*/
else if(0 == _NSGetExecutablePath(execpath, &nsexeclength) &&
-
_Py_isabs(execpath)
)
+
(wchar_t)execpath[0] == SEP
)
{
size_t len;
wchar_t *path = Py_DecodeLocale(execpath, &len);