| OLD | NEW |
| 1 #ifndef Py_ERRORS_H | 1 #ifndef Py_ERRORS_H |
| 2 #define Py_ERRORS_H | 2 #define Py_ERRORS_H |
| 3 #ifdef __cplusplus | 3 #ifdef __cplusplus |
| 4 extern "C" { | 4 extern "C" { |
| 5 #endif | 5 #endif |
| 6 | 6 |
| 7 /* Error objects */ | 7 /* Error objects */ |
| 8 | 8 |
| 9 #ifndef Py_LIMITED_API | 9 #ifndef Py_LIMITED_API |
| 10 /* PyException_HEAD defines the initial segment of every exception class. */ | 10 /* PyException_HEAD defines the initial segment of every exception class. */ |
| 11 #define PyException_HEAD PyObject_HEAD PyObject *dict;\ | 11 #define PyException_HEAD PyObject_HEAD PyObject *dict;\ |
| 12 PyObject *args; PyObject *traceback;\ | 12 PyObject *args; PyObject *traceback;\ |
| 13 PyObject *context; PyObject *cause; | 13 PyObject *context; PyObject *cause;\ |
| 14 int suppress_context; |
| 14 | 15 |
| 15 typedef struct { | 16 typedef struct { |
| 16 PyException_HEAD | 17 PyException_HEAD |
| 17 } PyBaseExceptionObject; | 18 } PyBaseExceptionObject; |
| 18 | 19 |
| 19 typedef struct { | 20 typedef struct { |
| 20 PyException_HEAD | 21 PyException_HEAD |
| 21 PyObject *msg; | 22 PyObject *msg; |
| 22 PyObject *filename; | 23 PyObject *filename; |
| 23 PyObject *lineno; | 24 PyObject *lineno; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *); | 99 PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *); |
| 99 PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); | 100 PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); |
| 100 | 101 |
| 101 /* Traceback manipulation (PEP 3134) */ | 102 /* Traceback manipulation (PEP 3134) */ |
| 102 PyAPI_FUNC(int) PyException_SetTraceback(PyObject *, PyObject *); | 103 PyAPI_FUNC(int) PyException_SetTraceback(PyObject *, PyObject *); |
| 103 PyAPI_FUNC(PyObject *) PyException_GetTraceback(PyObject *); | 104 PyAPI_FUNC(PyObject *) PyException_GetTraceback(PyObject *); |
| 104 | 105 |
| 105 /* Cause manipulation (PEP 3134) */ | 106 /* Cause manipulation (PEP 3134) */ |
| 106 PyAPI_FUNC(PyObject *) PyException_GetCause(PyObject *); | 107 PyAPI_FUNC(PyObject *) PyException_GetCause(PyObject *); |
| 107 PyAPI_FUNC(void) PyException_SetCause(PyObject *, PyObject *); | 108 PyAPI_FUNC(void) PyException_SetCause(PyObject *, PyObject *); |
| 108 PyAPI_FUNC(int) _PyException_SetCauseChecked(PyObject *, PyObject *); | |
| 109 | 109 |
| 110 /* Context manipulation (PEP 3134) */ | 110 /* Context manipulation (PEP 3134) */ |
| 111 PyAPI_FUNC(PyObject *) PyException_GetContext(PyObject *); | 111 PyAPI_FUNC(PyObject *) PyException_GetContext(PyObject *); |
| 112 PyAPI_FUNC(void) PyException_SetContext(PyObject *, PyObject *); | 112 PyAPI_FUNC(void) PyException_SetContext(PyObject *, PyObject *); |
| 113 | 113 |
| 114 | 114 |
| 115 /* */ | 115 /* */ |
| 116 | 116 |
| 117 #define PyExceptionClass_Check(x) \ | 117 #define PyExceptionClass_Check(x) \ |
| 118 (PyType_Check((x)) && \ | 118 (PyType_Check((x)) && \ |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 #include <stdarg.h> | 406 #include <stdarg.h> |
| 407 PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) | 407 PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) |
| 408 Py_GCC_ATTRIBUTE((format(printf, 3, 4))); | 408 Py_GCC_ATTRIBUTE((format(printf, 3, 4))); |
| 409 PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_l
ist va) | 409 PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_l
ist va) |
| 410 Py_GCC_ATTRIBUTE((format(printf, 3, 0))); | 410 Py_GCC_ATTRIBUTE((format(printf, 3, 0))); |
| 411 | 411 |
| 412 #ifdef __cplusplus | 412 #ifdef __cplusplus |
| 413 } | 413 } |
| 414 #endif | 414 #endif |
| 415 #endif /* !Py_ERRORS_H */ | 415 #endif /* !Py_ERRORS_H */ |
| OLD | NEW |