We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 944fa07 commit 9ad5298Copy full SHA for 9ad5298
src/wrapper.cpp
@@ -25,7 +25,7 @@ namespace detail
25
26
if (
27
PyMethod_Check(m.get())
28
- && ((PyMethodObject*)m.get())->im_self == this->m_self
+ && PyMethod_GET_SELF(m.get()) == this->m_self
29
&& class_object->tp_dict != 0
30
)
31
{
@@ -34,7 +34,7 @@ namespace detail
34
35
36
}
37
- if (borrowed_f != ((PyMethodObject*)m.get())->im_func)
+ if (borrowed_f != PyMethod_GET_FUNCTION(m.get()))
38
return override(m);
39
40
0 commit comments