mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
New errors.
This commit is contained in:
parent
4ab9b4c9ad
commit
2a9096b5f9
7 changed files with 137 additions and 126 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue