summaryrefslogtreecommitdiffstats
path: root/Include/pyerrors.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-12-15 21:57:34 (GMT)
committerGuido van Rossum <guido@python.org>2000-12-15 21:57:34 (GMT)
commit3fc30372c71b5e6885fd617ad68fc119a09dd5a4 (patch)
tree1fbf4c56bb77b1c9e03d6cda95891e8107c7c2bd /Include/pyerrors.h
parent1703cf662cb3c5c7c58f20f89899c8c00240ac18 (diff)
downloadcpython-3fc30372c71b5e6885fd617ad68fc119a09dd5a4.zip
cpython-3fc30372c71b5e6885fd617ad68fc119a09dd5a4.tar.gz
cpython-3fc30372c71b5e6885fd617ad68fc119a09dd5a4.tar.bz2
Add declarations for standard warning category classes (PyExc_Warning
etc.) and the PyErr_Warn() function.
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r--Include/pyerrors.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index 8747aec..c8c3d82 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -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);