2021-08-08 04:08:33 +00:00
|
|
|
#ifndef Py_WARNINGS_H
|
|
|
|
#define Py_WARNINGS_H
|
2021-08-12 07:42:14 +00:00
|
|
|
#include "third_party/python/Include/object.h"
|
2021-08-10 17:26:13 +00:00
|
|
|
COSMOPOLITAN_C_START_
|
2021-08-08 04:08:33 +00:00
|
|
|
|
|
|
|
#ifndef Py_LIMITED_API
|
2021-08-12 07:42:14 +00:00
|
|
|
PyObject *_PyWarnings_Init(void);
|
2021-08-08 04:08:33 +00:00
|
|
|
#endif
|
|
|
|
|
2021-08-12 07:42:14 +00:00
|
|
|
int PyErr_WarnEx(PyObject *, const char *, Py_ssize_t);
|
|
|
|
int PyErr_WarnFormat(PyObject *, Py_ssize_t, const char *, ...);
|
|
|
|
|
|
|
|
#if !defined(Py_LIMITED_API) || Py_LIMITED_API + 0 >= 0x03060000
|
|
|
|
int PyErr_ResourceWarning(PyObject *, Py_ssize_t, const char *, ...);
|
2021-08-08 04:08:33 +00:00
|
|
|
#endif
|
2021-08-12 07:42:14 +00:00
|
|
|
|
2021-08-08 04:08:33 +00:00
|
|
|
#ifndef Py_LIMITED_API
|
2021-08-12 07:42:14 +00:00
|
|
|
int PyErr_WarnExplicitObject(PyObject *, PyObject *, PyObject *, int,
|
|
|
|
PyObject *, PyObject *);
|
2021-08-08 04:08:33 +00:00
|
|
|
#endif
|
2021-08-12 07:42:14 +00:00
|
|
|
|
|
|
|
int PyErr_WarnExplicit(PyObject *, const char *, const char *, int,
|
|
|
|
const char *, PyObject *);
|
2021-08-08 04:08:33 +00:00
|
|
|
|
|
|
|
#ifndef Py_LIMITED_API
|
2021-08-12 07:42:14 +00:00
|
|
|
int PyErr_WarnExplicitFormat(PyObject *, const char *, int, const char *,
|
|
|
|
PyObject *, const char *, ...);
|
2021-08-08 04:08:33 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef Py_LIMITED_API
|
|
|
|
#define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1)
|
|
|
|
#endif
|
|
|
|
|
2021-08-10 17:26:13 +00:00
|
|
|
COSMOPOLITAN_C_END_
|
2021-08-08 04:08:33 +00:00
|
|
|
#endif /* !Py_WARNINGS_H */
|