MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / get_override

Method get_override

edrav2/eprj/boost/libs/python/src/wrapper.cpp:11–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace detail
10{
11 override wrapper_base::get_override(
12 char const* name
13 , PyTypeObject* class_object
14 ) const
15 {
16 if (this->m_self)
17 {
18 if (handle<> m = handle<>(
19 python::allow_null(
20 ::PyObject_GetAttrString(
21 this->m_self, const_cast<char*>(name))))
22 )
23 {
24 PyObject* borrowed_f = 0;
25
26 if (
27 PyMethod_Check(m.get())
28 && ((PyMethodObject*)m.get())->im_self == this->m_self
29 && class_object->tp_dict != 0
30 )
31 {
32 borrowed_f = ::PyDict_GetItemString(
33 class_object->tp_dict, const_cast<char*>(name));
34
35
36 }
37 if (borrowed_f != ((PyMethodObject*)m.get())->im_func)
38 return override(m);
39 }
40 }
41 return override(handle<>(detail::none()));
42 }
43}
44
45#if 0

Callers 6

helloMethod · 0.45
fMethod · 0.45
fMethod · 0.45
fMethod · 0.45
idMethod · 0.45
helloMethod · 0.45

Calls 4

allow_nullFunction · 0.85
overrideFunction · 0.85
noneClass · 0.50
getMethod · 0.45

Tested by 5

fMethod · 0.36
fMethod · 0.36
fMethod · 0.36
idMethod · 0.36
helloMethod · 0.36