provide get_py and get_py_ptr
[mussa.git] / py / python.cpp
index 75a844fbe6d9080b4111e764ab5b6e2592e8f7ee..0de06766470fd882e0f7a0bd857800973718fa7d 100644 (file)
@@ -133,11 +133,16 @@ py::object MussaPython::operator[](std::string name)
 }
 
 //! return a reference to a single mussa python interpreter
-MussaPython *get_py()
+MussaPython *get_py_ptr()
 {
   static MussaPython *py;
   if (!py) {
     py = new MussaPython;
   }
   return py;
+}
+
+MussaPython &get_py()
+{
+  return *get_py_ptr();
 }
\ No newline at end of file