jpayne@69: #ifndef Py_WARNINGS_H jpayne@69: #define Py_WARNINGS_H jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: #ifndef Py_LIMITED_API jpayne@69: PyAPI_FUNC(PyObject*) _PyWarnings_Init(void); jpayne@69: #endif jpayne@69: jpayne@69: PyAPI_FUNC(int) PyErr_WarnEx( jpayne@69: PyObject *category, jpayne@69: const char *message, /* UTF-8 encoded string */ jpayne@69: Py_ssize_t stack_level); jpayne@69: PyAPI_FUNC(int) PyErr_WarnFormat( jpayne@69: PyObject *category, jpayne@69: Py_ssize_t stack_level, jpayne@69: const char *format, /* ASCII-encoded string */ jpayne@69: ...); jpayne@69: jpayne@69: #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 jpayne@69: /* Emit a ResourceWarning warning */ jpayne@69: PyAPI_FUNC(int) PyErr_ResourceWarning( jpayne@69: PyObject *source, jpayne@69: Py_ssize_t stack_level, jpayne@69: const char *format, /* ASCII-encoded string */ jpayne@69: ...); jpayne@69: #endif jpayne@69: #ifndef Py_LIMITED_API jpayne@69: PyAPI_FUNC(int) PyErr_WarnExplicitObject( jpayne@69: PyObject *category, jpayne@69: PyObject *message, jpayne@69: PyObject *filename, jpayne@69: int lineno, jpayne@69: PyObject *module, jpayne@69: PyObject *registry); jpayne@69: #endif jpayne@69: PyAPI_FUNC(int) PyErr_WarnExplicit( jpayne@69: PyObject *category, jpayne@69: const char *message, /* UTF-8 encoded string */ jpayne@69: const char *filename, /* decoded from the filesystem encoding */ jpayne@69: int lineno, jpayne@69: const char *module, /* UTF-8 encoded string */ jpayne@69: PyObject *registry); jpayne@69: jpayne@69: #ifndef Py_LIMITED_API jpayne@69: PyAPI_FUNC(int) jpayne@69: PyErr_WarnExplicitFormat(PyObject *category, jpayne@69: const char *filename, int lineno, jpayne@69: const char *module, PyObject *registry, jpayne@69: const char *format, ...); jpayne@69: #endif jpayne@69: jpayne@69: /* DEPRECATED: Use PyErr_WarnEx() instead. */ jpayne@69: #ifndef Py_LIMITED_API jpayne@69: #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) jpayne@69: #endif jpayne@69: jpayne@69: #ifndef Py_LIMITED_API jpayne@69: void _PyErr_WarnUnawaitedCoroutine(PyObject *coro); jpayne@69: #endif jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: #endif /* !Py_WARNINGS_H */ jpayne@69: