summaryrefslogtreecommitdiffstats
path: root/Objects/methodobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r--Objects/methodobject.c5
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;