Commit 162287b8 authored by Guido van Rossum's avatar Guido van Rossum

Add declarations for standard warning category classes (PyExc_Warning

etc.) and the PyErr_Warn() function.
parent 71d96c77
......@@ -60,6 +60,13 @@ extern DL_IMPORT(PyObject *) PyExc_WindowsError;
extern DL_IMPORT(PyObject *) PyExc_MemoryErrorInst;
/* Predefined warning categories */
extern DL_IMPORT(PyObject *) PyExc_Warning;
extern DL_IMPORT(PyObject *) PyExc_UserWarning;
extern DL_IMPORT(PyObject *) PyExc_DeprecationWarning;
extern DL_IMPORT(PyObject *) PyExc_SyntaxWarning;
extern DL_IMPORT(PyObject *) PyExc_RuntimeWarning;
/* Convenience functions */
......@@ -85,6 +92,9 @@ DL_IMPORT(PyObject *) PyErr_NewException(char *name, PyObject *base,
PyObject *dict);
extern DL_IMPORT(void) PyErr_WriteUnraisable(PyObject *);
/* Issue a warning or exception */
extern DL_IMPORT(int) PyErr_Warn(PyObject *, char *);
/* In sigcheck.c or signalmodule.c */
extern DL_IMPORT(int) PyErr_CheckSignals(void);
extern DL_IMPORT(void) PyErr_SetInterrupt(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment