From 5b62942074f2f6ae57c0e1bd8e4993dff4f5997f Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 23 Dec 2011 12:40:16 +0100 Subject: Issue #13577: Built-in methods and functions now have a __qualname__. Patch by sbt. --- Include/methodobject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Include/methodobject.h') diff --git a/Include/methodobject.h b/Include/methodobject.h index 7e67c0bf9a..d798d134e2 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 -- cgit v1.2.1