diff options
Diffstat (limited to 'Include/methodobject.h')
-rw-r--r-- | Include/methodobject.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/methodobject.h b/Include/methodobject.h index 7e67c0b..d798d13 100644 --- a/Include/methodobject.h +++ b/Include/methodobject.h @@ -30,7 +30,8 @@ PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *); #define PyCFunction_GET_FUNCTION(func) \ (((PyCFunctionObject *)func) -> m_ml -> ml_meth) #define PyCFunction_GET_SELF(func) \ - (((PyCFunctionObject *)func) -> m_self) + (((PyCFunctionObject *)func) -> m_ml -> ml_flags & METH_STATIC ? \ + NULL : ((PyCFunctionObject *)func) -> m_self) #define PyCFunction_GET_FLAGS(func) \ (((PyCFunctionObject *)func) -> m_ml -> ml_flags) #endif |