New errors.

This commit is contained in:
Guido van Rossum 1990-10-21 22:15:08 +00:00
parent 4ab9b4c9ad
commit 2a9096b5f9
7 changed files with 137 additions and 126 deletions

View file

@ -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;