Skip to content

Commit b6e0fc7

Browse files
authored
bpo-38353: Fix typos in calculate_argv0_path_framework() (GH-16695)
bpo-38353, bpo-38429: Fix typos introduced by commit c02b41b in calculate_argv0_path_framework() of getpath.c.
1 parent d47f0dd commit b6e0fc7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/getpath.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ calculate_argv0_path_framework(PyCalculatePath *calculate, _PyPathConfig *pathco
11261126
}
11271127

11281128
reduce(parent);
1129-
wchar_t *lib_python = joinpath2(path, calculate->lib_python);
1129+
wchar_t *lib_python = joinpath2(parent, calculate->lib_python);
11301130
PyMem_RawFree(parent);
11311131

11321132
if (lib_python == NULL) {
@@ -1144,7 +1144,7 @@ calculate_argv0_path_framework(PyCalculatePath *calculate, _PyPathConfig *pathco
11441144
if (!module) {
11451145
/* We are in the build directory so use the name of the
11461146
executable - we know that the absolute path is passed */
1147-
PyMem_RawFree(*calculate->argv0_path);
1147+
PyMem_RawFree(calculate->argv0_path);
11481148
calculate->argv0_path = _PyMem_RawWcsdup(pathconfig->program_full_path);
11491149
if (calculate->argv0_path == NULL) {
11501150
status = _PyStatus_NO_MEMORY();
@@ -1156,8 +1156,8 @@ calculate_argv0_path_framework(PyCalculatePath *calculate, _PyPathConfig *pathco
11561156
}
11571157

11581158
/* Use the location of the library as argv0_path */
1159-
PyMem_RawFree(*calculate->argv0_path);
1160-
calculate->argv0_path = wbuf
1159+
PyMem_RawFree(calculate->argv0_path);
1160+
calculate->argv0_path = wbuf;
11611161
return _PyStatus_OK();
11621162

11631163
done:

0 commit comments

Comments
 (0)