diff options
author | Guido van Rossum <guido@python.org> | 1990-10-21 22:15:08 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1990-10-21 22:15:08 (GMT) |
commit | 2a9096b5f9d90c6d90a9386c82214237ffc69167 (patch) | |
tree | 03c72b99e99ca71c4794e361713981e683b9c5c2 /Objects/methodobject.c | |
parent | 4ab9b4c9adbd5ed42bc163033b3a01572b527ca3 (diff) | |
download | cpython-2a9096b5f9d90c6d90a9386c82214237ffc69167.zip cpython-2a9096b5f9d90c6d90a9386c82214237ffc69167.tar.gz cpython-2a9096b5f9d90c6d90a9386c82214237ffc69167.tar.bz2 |
New errors.
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r-- | Objects/methodobject.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 5015899..c8b5ee0 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -9,6 +9,7 @@ #include "methodobject.h" #include "objimpl.h" #include "token.h" +#include "errors.h" typedef struct { OB_HEAD @@ -39,7 +40,7 @@ getmethod(op) object *op; { if (!is_methodobject(op)) { - errno = EBADF; + err_badcall(); return NULL; } return ((methodobject *)op) -> m_meth; @@ -50,7 +51,7 @@ getself(op) object *op; { if (!is_methodobject(op)) { - errno = EBADF; + err_badcall(); return NULL; } return ((methodobject *)op) -> m_self; |