MCPcopy Create free account
hub / github.com/ceph/ceph / method_exists

Method method_exists

src/mgr/ActivePyModule.cc:131–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131bool 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
144std::optional<std::vector<std::byte>> ActivePyModule::dispatch_remote(
145 const std::string &method,

Callers 1

ceph_dispatch_remoteFunction · 0.45

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected