summaryrefslogtreecommitdiffstats
path: root/Include/pyerrors.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r--Include/pyerrors.h64
1 files changed, 32 insertions, 32 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index a4233c9..e4f5df6 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -94,25 +94,25 @@ PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
/* */
-#define PyExceptionClass_Check(x) \
- (PyClass_Check((x)) || (PyType_Check((x)) && \
- PyType_FastSubclass((PyTypeObject*)(x), Py_TPFLAGS_BASE_EXC_SUBCLASS)))
+#define PyExceptionClass_Check(x) \
+ (PyClass_Check((x)) || (PyType_Check((x)) && \
+ PyType_FastSubclass((PyTypeObject*)(x), Py_TPFLAGS_BASE_EXC_SUBCLASS)))
-#define PyExceptionInstance_Check(x) \
- (PyInstance_Check((x)) || \
- PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS))
+#define PyExceptionInstance_Check(x) \
+ (PyInstance_Check((x)) || \
+ PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS))
-#define PyExceptionClass_Name(x) \
- (PyClass_Check((x)) \
- ? PyString_AS_STRING(((PyClassObject*)(x))->cl_name) \
- : (char *)(((PyTypeObject*)(x))->tp_name))
+#define PyExceptionClass_Name(x) \
+ (PyClass_Check((x)) \
+ ? PyString_AS_STRING(((PyClassObject*)(x))->cl_name) \
+ : (char *)(((PyTypeObject*)(x))->tp_name))
+
+#define PyExceptionInstance_Class(x) \
+ ((PyInstance_Check((x)) \
+ ? (PyObject*)((PyInstanceObject*)(x))->in_class \
+ : (PyObject*)((x)->ob_type)))
-#define PyExceptionInstance_Class(x) \
- ((PyInstance_Check((x)) \
- ? (PyObject*)((PyInstanceObject*)(x))->in_class \
- : (PyObject*)((x)->ob_type)))
-
/* Predefined exceptions */
PyAPI_DATA(PyObject *) PyExc_BaseException;
@@ -184,33 +184,33 @@ PyAPI_FUNC(int) PyErr_BadArgument(void);
PyAPI_FUNC(PyObject *) PyErr_NoMemory(void);
PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *);
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject(
- PyObject *, PyObject *);
+ PyObject *, PyObject *);
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *);
#ifdef Py_WIN_WIDE_FILENAMES
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
- PyObject *, Py_UNICODE *);
+ PyObject *, Py_UNICODE *);
#endif /* Py_WIN_WIDE_FILENAMES */
PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...)
- Py_GCC_ATTRIBUTE((format(printf, 2, 3)));
+ Py_GCC_ATTRIBUTE((format(printf, 2, 3)));
#ifdef MS_WINDOWS
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(
- int, const char *);
+ int, const char *);
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
- int, const char *);
+ int, const char *);
#ifdef Py_WIN_WIDE_FILENAMES
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename(
- int, const Py_UNICODE *);
+ int, const Py_UNICODE *);
#endif /* Py_WIN_WIDE_FILENAMES */
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject(
- PyObject *,int, PyObject *);
+ PyObject *,int, PyObject *);
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
- PyObject *,int, const char *);
+ PyObject *,int, const char *);
#ifdef Py_WIN_WIDE_FILENAMES
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename(
- PyObject *,int, const Py_UNICODE *);
+ PyObject *,int, const Py_UNICODE *);
#endif /* Py_WIN_WIDE_FILENAMES */
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
#endif /* MS_WINDOWS */
@@ -244,15 +244,15 @@ PyAPI_FUNC(PyObject *) PyErr_ProgramText(const char *, int);
/* create a UnicodeDecodeError object */
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_Create(
- const char *, const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
+ const char *, const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
/* create a UnicodeEncodeError object */
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_Create(
- const char *, const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
+ const char *, const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
/* create a UnicodeTranslateError object */
PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_Create(
- const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
+ const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *);
/* get the encoding attribute */
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetEncoding(PyObject *);
@@ -295,11 +295,11 @@ PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetReason(PyObject *);
/* assign a new value to the reason attribute
return 0 on success, -1 on failure */
PyAPI_FUNC(int) PyUnicodeEncodeError_SetReason(
- PyObject *, const char *);
+ PyObject *, const char *);
PyAPI_FUNC(int) PyUnicodeDecodeError_SetReason(
- PyObject *, const char *);
+ PyObject *, const char *);
PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
- PyObject *, const char *);
+ PyObject *, const char *);
#endif
@@ -319,9 +319,9 @@ PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
#include <stdarg.h>
PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
- Py_GCC_ATTRIBUTE((format(printf, 3, 4)));
+ Py_GCC_ATTRIBUTE((format(printf, 3, 4)));
PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
- Py_GCC_ATTRIBUTE((format(printf, 3, 0)));
+ Py_GCC_ATTRIBUTE((format(printf, 3, 0)));
#ifdef __cplusplus
}