| 2081 | } |
| 2082 | |
| 2083 | inline void show(const bool block = true) |
| 2084 | { |
| 2085 | detail::_interpreter::get(); |
| 2086 | |
| 2087 | PyObject* res; |
| 2088 | if(block) |
| 2089 | { |
| 2090 | res = PyObject_CallObject( |
| 2091 | detail::_interpreter::get().s_python_function_show, |
| 2092 | detail::_interpreter::get().s_python_empty_tuple); |
| 2093 | } |
| 2094 | else |
| 2095 | { |
| 2096 | PyObject *kwargs = PyDict_New(); |
| 2097 | PyDict_SetItemString(kwargs, "block", Py_False); |
| 2098 | res = PyObject_Call( detail::_interpreter::get().s_python_function_show, detail::_interpreter::get().s_python_empty_tuple, kwargs); |
| 2099 | Py_DECREF(kwargs); |
| 2100 | } |
| 2101 | |
| 2102 | |
| 2103 | if (!res) throw std::runtime_error("Call to show() failed."); |
| 2104 | |
| 2105 | Py_DECREF(res); |
| 2106 | } |
| 2107 | |
| 2108 | inline void close() |
| 2109 | { |
nothing calls this directly
no outgoing calls
no test coverage detected