Mercurial > cpython-lru_cache-weakref
diff Include/methodobject.h @ 74141:7a7b698f6f21
Issue #13577: Built-in methods and functions now have a __qualname__.
Patch by sbt.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Fri, 23 Dec 2011 12:40:16 +0100 |
| parents | 62b61abd02b8 |
| children | 64b8fdb0bfa9 |
line wrap: on
line diff
--- a/Include/methodobject.h Fri Dec 23 17:04:23 2011 +0800 +++ b/Include/methodobject.h Fri Dec 23 12:40:16 2011 +0100 @@ -30,7 +30,8 @@ #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
