diff options
-rwxr-xr-x | Include/errors.h | 21 | ||||
-rw-r--r-- | Include/pyerrors.h | 21 |
2 files changed, 28 insertions, 14 deletions
diff --git a/Include/errors.h b/Include/errors.h index 35faaa9..c8fc63b 100755 --- a/Include/errors.h +++ b/Include/errors.h @@ -8,10 +8,17 @@ void err_get PROTO((object **, object **)); void err_clear PROTO((void)); /* Predefined exceptions (in run.c) */ -object *RuntimeError; /* Raised by error() */ -object *EOFError; /* Raised by eof_error() */ -object *TypeError; /* Rased by type_error() */ -object *MemoryError; /* Raised by mem_error() */ -object *NameError; /* Raised by name_error() */ -object *SystemError; /* Raised by sys_error() */ -object *KeyboardInterrupt; /* Raised by intr_error() */ + +extern object *RuntimeError; +extern object *EOFError; +extern object *TypeError; +extern object *MemoryError; +extern object *NameError; +extern object *SystemError; +extern object *KeyboardInterrupt; + +/* Convenience functions */ + +extern int err_badarg PROTO((void)); +extern object *err_nomem PROTO((void)); +extern object *err_errno PROTO((object *)); diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 35faaa9..c8fc63b 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -8,10 +8,17 @@ void err_get PROTO((object **, object **)); void err_clear PROTO((void)); /* Predefined exceptions (in run.c) */ -object *RuntimeError; /* Raised by error() */ -object *EOFError; /* Raised by eof_error() */ -object *TypeError; /* Rased by type_error() */ -object *MemoryError; /* Raised by mem_error() */ -object *NameError; /* Raised by name_error() */ -object *SystemError; /* Raised by sys_error() */ -object *KeyboardInterrupt; /* Raised by intr_error() */ + +extern object *RuntimeError; +extern object *EOFError; +extern object *TypeError; +extern object *MemoryError; +extern object *NameError; +extern object *SystemError; +extern object *KeyboardInterrupt; + +/* Convenience functions */ + +extern int err_badarg PROTO((void)); +extern object *err_nomem PROTO((void)); +extern object *err_errno PROTO((object *)); |