diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-06-28 14:49:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-28 14:49:38 (GMT) |
commit | 3029035ef34c9bae0c8d965290cd9b273c8de1ea (patch) | |
tree | ecbd089ae1b257f14c3360e53c8d3f25abab56cb /Modules | |
parent | b1263d5a60d3f7ab02dd28409fff59b3815a3f67 (diff) | |
download | cpython-3029035ef34c9bae0c8d965290cd9b273c8de1ea.zip cpython-3029035ef34c9bae0c8d965290cd9b273c8de1ea.tar.gz cpython-3029035ef34c9bae0c8d965290cd9b273c8de1ea.tar.bz2 |
bpo-20443: Fix calculate_program_full_path() warning (GH-14446)
Don't call _Py_isabs() with a bytes string (char*), the function
expects as wide string.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/getpath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c index 751c0b7..4ddb663 100644 --- 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); |