| 129 | } |
| 130 | |
| 131 | bool ActivePyModule::method_exists(const std::string &method) const |
| 132 | { |
| 133 | Gil gil(py_module->pMyThreadState, true); |
| 134 | |
| 135 | auto boundMethod = PyObject_GetAttrString(pClassInstance, method.c_str()); |
| 136 | if (boundMethod == nullptr) { |
| 137 | return false; |
| 138 | } else { |
| 139 | Py_DECREF(boundMethod); |
| 140 | return true; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | std::optional<std::vector<std::byte>> ActivePyModule::dispatch_remote( |
| 145 | const std::string &method, |
no test coverage detected