From 3aa548f03803369a420b688dd294ffcdf2d9cb17 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 28 Aug 2020 13:44:52 -0400 Subject: [PATCH] Fix compiler errors --- include/pybind11/embed.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/embed.h b/include/pybind11/embed.h index e1df90f53c..064b002a3c 100644 --- a/include/pybind11/embed.h +++ b/include/pybind11/embed.h @@ -100,7 +100,7 @@ struct wide_char_arg_deleter { } }; -wchar_t* widen_chars(char* safe_arg) { +inline wchar_t* widen_chars(char* safe_arg) { #if PY_VERSION_HEX >= 0x030500f0 wchar_t* widened_arg = Py_DecodeLocale(safe_arg, nullptr); #else @@ -159,7 +159,7 @@ inline void set_interpreter_argv(int argc, char** argv, bool add_current_dir_to_ // to work around CVE-2008-5983 PySys_SetArgv(argc, pysys_argv); if (!add_current_dir_to_path) - PyList_PopItem(py::module::import("sys").attr("path").ptr(), 0); + module::import("sys").attr("path").attr("pop")(); #else PySys_SetArgvEx(argc, pysys_argv, add_current_dir_to_path ? 1 : 0); #endif