From 77e6b46c4ad852f408e5bb72e13b30aa870e897f Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Thu, 11 Jun 2020 11:59:00 +0200 Subject: [PATCH] Replace PLATLIBDIR macro with config->platlibdir --- Modules/getpath.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/getpath.c b/Modules/getpath.c index 469c9ca010640f..e2abcff6c4a145 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -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;