| 2164 | } |
| 2165 | |
| 2166 | inline void save(const std::string& filename) |
| 2167 | { |
| 2168 | detail::_interpreter::get(); |
| 2169 | |
| 2170 | PyObject* pyfilename = PyString_FromString(filename.c_str()); |
| 2171 | |
| 2172 | PyObject* args = PyTuple_New(1); |
| 2173 | PyTuple_SetItem(args, 0, pyfilename); |
| 2174 | std::cout<<"args:"<<filename.c_str()<<std::endl; |
| 2175 | |
| 2176 | PyObject* res = PyObject_CallObject(detail::_interpreter::get().s_python_function_save, args); |
| 2177 | if (!res) throw std::runtime_error("Call to save() failed."); |
| 2178 | |
| 2179 | Py_DECREF(args); |
| 2180 | Py_DECREF(res); |
| 2181 | } |
| 2182 | |
| 2183 | inline void clf() { |
| 2184 | detail::_interpreter::get(); |
nothing calls this directly
no outgoing calls
no test coverage detected