Mercurial > cpython-lru_cache-weakref
diff Objects/methodobject.c @ 27:82c7bab78bb1 legacy-trunk
New errors.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sun, 21 Oct 1990 22:15:08 +0000 |
| parents | fc6fcd7df4f7 |
| children | a6934380c6e7 |
line wrap: on
line diff
--- a/Objects/methodobject.c Sun Oct 21 22:13:08 1990 +0000 +++ b/Objects/methodobject.c Sun Oct 21 22:15:08 1990 +0000 @@ -9,6 +9,7 @@ #include "methodobject.h" #include "objimpl.h" #include "token.h" +#include "errors.h" typedef struct { OB_HEAD @@ -39,7 +40,7 @@ object *op; { if (!is_methodobject(op)) { - errno = EBADF; + err_badcall(); return NULL; } return ((methodobject *)op) -> m_meth; @@ -50,7 +51,7 @@ object *op; { if (!is_methodobject(op)) { - errno = EBADF; + err_badcall(); return NULL; } return ((methodobject *)op) -> m_self;
