summaryrefslogtreecommitdiffstats
path: root/Include/cpython/warnings.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/cpython/warnings.h')
-rw-r--r--Include/cpython/warnings.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Include/cpython/warnings.h b/Include/cpython/warnings.h
new file mode 100644
index 0000000..2ef8e3c
--- /dev/null
+++ b/Include/cpython/warnings.h
@@ -0,0 +1,20 @@
+#ifndef Py_CPYTHON_WARNINGS_H
+# error "this header file must not be included directly"
+#endif
+
+PyAPI_FUNC(int) PyErr_WarnExplicitObject(
+ PyObject *category,
+ PyObject *message,
+ PyObject *filename,
+ int lineno,
+ PyObject *module,
+ PyObject *registry);
+
+PyAPI_FUNC(int) PyErr_WarnExplicitFormat(
+ PyObject *category,
+ const char *filename, int lineno,
+ const char *module, PyObject *registry,
+ const char *format, ...);
+
+// DEPRECATED: Use PyErr_WarnEx() instead.
+#define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1)