Store Sequence sequence location in a shared_ptr class
[mussa.git] / py / python.cpp
index 75a844fbe6d9080b4111e764ab5b6e2592e8f7ee..cc7dfdc52224e47a2b42da8cbb825d48d0065e06 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;
-}
\ No newline at end of file
+}
+
+MussaPython &get_py()
+{
+  return *get_py_ptr();
+}