warnings.h 658 B

1234567891011121314151617181920212223
  1. #ifndef Py_WARNINGS_H
  2. #define Py_WARNINGS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. PyAPI_FUNC(void) _PyWarnings_Init(void);
  7. PyAPI_FUNC(int) PyErr_WarnEx(PyObject *, const char *, Py_ssize_t);
  8. PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject *, const char *, const char *, int,
  9. const char *, PyObject *);
  10. #define PyErr_WarnPy3k(msg, stacklevel) \
  11. (Py_Py3kWarningFlag ? PyErr_WarnEx(PyExc_DeprecationWarning, msg, stacklevel) : 0)
  12. /* DEPRECATED: Use PyErr_WarnEx() instead. */
  13. #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1)
  14. #ifdef __cplusplus
  15. }
  16. #endif
  17. #endif /* !Py_WARNINGS_H */