Skip to content

Commit 7b4acf0

Browse files
committed
EAMxx: fix undefined pybind namespace shortcut
1 parent d772848 commit 7b4acf0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/eamxx/src/share/core/eamxx_pysession.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ inline void PySession::initialize () {
7979
// Note: if Py interpreter is already inited, we ASSUME someone else
8080
// is handling the interpreter initialization/finalization
8181
if (not Py_IsInitialized()) {
82-
py_guard = std::make_shared<py::scoped_interpreter>();
82+
py_guard = std::make_shared<pybind11::scoped_interpreter>();
8383
}
8484
}
8585
++num_customers;
@@ -103,14 +103,14 @@ inline void PySession::add_path (const std::string& path)
103103

104104
try {
105105
// Import the sys module
106-
py::module sysModule = py::module::import("sys");
106+
pybind11::module sysModule = pybind11::module::import("sys");
107107

108108
// Get the sys.path list
109-
py::list sysPath = sysModule.attr("path");
109+
pybind11::list sysPath = sysModule.attr("path");
110110

111111
// Append the new path to sys.path
112112
sysPath.append(path);
113-
} catch (const py::error_already_set& e) {
113+
} catch (const pybind11::error_already_set& e) {
114114
std::cerr << "Error: " << e.what() << std::endl;
115115
throw std::runtime_error("Could not modify sys.path. Aborting.");
116116
}

0 commit comments

Comments
 (0)