@@ -263,7 +263,7 @@ fine::Ok<> init(ErlNifEnv *env, std::string python_dl_path,
263263 // containing the built-in Python modules [1].
264264 //
265265 // [1]: https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
266- // Py_SetPythonHome(python_home_path_w.c_str());
266+ Py_SetPythonHome (python_home_path_w.c_str ());
267267 Py_SetProgramName (python_executable_path_w.c_str ());
268268
269269 Py_InitializeEx (0 );
@@ -299,14 +299,14 @@ fine::Ok<> init(ErlNifEnv *env, std::string python_dl_path,
299299 raise_if_failed (env, py_sys_path);
300300 auto py_sys_path_guard = PyDecRefGuard (py_sys_path);
301301
302- // for (const auto &path : sys_paths) {
303- // auto py_path = PyUnicode_FromStringAndSize(
304- // reinterpret_cast<const char *>(path.data), path.size);
305- // raise_if_failed(env, py_path);
306- // auto py_path_guard = PyDecRefGuard(py_path);
302+ for (const auto &path : sys_paths) {
303+ auto py_path = PyUnicode_FromStringAndSize (
304+ reinterpret_cast <const char *>(path.data ), path.size );
305+ raise_if_failed (env, py_path);
306+ auto py_path_guard = PyDecRefGuard (py_path);
307307
308- // raise_if_failed(env, PyList_Append(py_sys_path, py_path));
309- // }
308+ raise_if_failed (env, PyList_Append (py_sys_path, py_path));
309+ }
310310
311311 // Define global stdout and stdin overrides
312312
0 commit comments