bpo-40947: Replace PLATLIBDIR macro with config->platlibdir by manisandro · Pull Request #20799 · python/cpython
Expand Up
@@ -1452,10 +1452,12 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
return DECODE_LOCALE_ERR("VPATH macro", len);
}
calculate->lib_python = Py_DecodeLocale(PLATLIBDIR "/python" VERSION, &len); if (!calculate->lib_python) { wchar_t * pyversion = Py_DecodeLocale("python" VERSION, &len); if (!pyversion) { return DECODE_LOCALE_ERR("VERSION macro", len); } calculate->lib_python = joinpath2(config->platlibdir, pyversion); PyMem_RawFree(pyversion);
calculate->warnings = config->pathconfig_warnings; calculate->pythonpath_env = config->pythonpath_env; Expand Down
calculate->lib_python = Py_DecodeLocale(PLATLIBDIR "/python" VERSION, &len); if (!calculate->lib_python) { wchar_t * pyversion = Py_DecodeLocale("python" VERSION, &len); if (!pyversion) { return DECODE_LOCALE_ERR("VERSION macro", len); } calculate->lib_python = joinpath2(config->platlibdir, pyversion); PyMem_RawFree(pyversion);
calculate->warnings = config->pathconfig_warnings; calculate->pythonpath_env = config->pythonpath_env; Expand Down