diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-12-23 11:40:16 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-12-23 11:40:16 (GMT) |
commit | 5b62942074f2f6ae57c0e1bd8e4993dff4f5997f (patch) | |
tree | bf3f323f4b84a51edae986f2fee3686cc2d4c9bd /Include/methodobject.h | |
parent | d22983d081845009e894dced4c4d835f18755520 (diff) | |
download | cpython-5b62942074f2f6ae57c0e1bd8e4993dff4f5997f.zip cpython-5b62942074f2f6ae57c0e1bd8e4993dff4f5997f.tar.gz cpython-5b62942074f2f6ae57c0e1bd8e4993dff4f5997f.tar.bz2 |
Issue #13577: Built-in methods and functions now have a __qualname__.
Patch by sbt.
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 |