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.
This commit is contained in:
Victor Stinner 2019-06-28 16:49:38 +02:00 committed by GitHub
parent b1263d5a60
commit 3029035ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);