summaryrefslogtreecommitdiffstats
path: root/Include/pyerrors.h
diff options
context:
space:
mode:
authorMark Hammond <mhammond@skippinet.com.au>2002-08-12 07:21:58 (GMT)
committerMark Hammond <mhammond@skippinet.com.au>2002-08-12 07:21:58 (GMT)
commit91a681debf9ffec155d0aff8a0bb5f965f592e16 (patch)
tree09f28782e3b0a24e64deddeafc9df24ac93855ca /Include/pyerrors.h
parent44121a6bc9828c993932b87e442440dc4f260f3c (diff)
downloadcpython-91a681debf9ffec155d0aff8a0bb5f965f592e16.zip
cpython-91a681debf9ffec155d0aff8a0bb5f965f592e16.tar.gz
cpython-91a681debf9ffec155d0aff8a0bb5f965f592e16.tar.bz2
Excise DL_EXPORT from Include.
Thanks to Skip Montanaro and Kalle Svensson for the patches.
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r--Include/pyerrors.h146
1 files changed, 73 insertions, 73 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index f06d38c..a3d9c5d 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -7,111 +7,111 @@ extern "C" {
/* Error handling definitions */
-DL_IMPORT(void) PyErr_SetNone(PyObject *);
-DL_IMPORT(void) PyErr_SetObject(PyObject *, PyObject *);
-DL_IMPORT(void) PyErr_SetString(PyObject *, const char *);
-DL_IMPORT(PyObject *) PyErr_Occurred(void);
-DL_IMPORT(void) PyErr_Clear(void);
-DL_IMPORT(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **);
-DL_IMPORT(void) PyErr_Restore(PyObject *, PyObject *, PyObject *);
+PyAPI_FUNC(void) PyErr_SetNone(PyObject *);
+PyAPI_FUNC(void) PyErr_SetObject(PyObject *, PyObject *);
+PyAPI_FUNC(void) PyErr_SetString(PyObject *, const char *);
+PyAPI_FUNC(PyObject *) PyErr_Occurred(void);
+PyAPI_FUNC(void) PyErr_Clear(void);
+PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **);
+PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *);
/* Error testing and normalization */
-DL_IMPORT(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *);
-DL_IMPORT(int) PyErr_ExceptionMatches(PyObject *);
-DL_IMPORT(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
+PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *);
+PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *);
+PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
/* Predefined exceptions */
-extern DL_IMPORT(PyObject *) PyExc_Exception;
-extern DL_IMPORT(PyObject *) PyExc_StopIteration;
-extern DL_IMPORT(PyObject *) PyExc_StandardError;
-extern DL_IMPORT(PyObject *) PyExc_ArithmeticError;
-extern DL_IMPORT(PyObject *) PyExc_LookupError;
-
-extern DL_IMPORT(PyObject *) PyExc_AssertionError;
-extern DL_IMPORT(PyObject *) PyExc_AttributeError;
-extern DL_IMPORT(PyObject *) PyExc_EOFError;
-extern DL_IMPORT(PyObject *) PyExc_FloatingPointError;
-extern DL_IMPORT(PyObject *) PyExc_EnvironmentError;
-extern DL_IMPORT(PyObject *) PyExc_IOError;
-extern DL_IMPORT(PyObject *) PyExc_OSError;
-extern DL_IMPORT(PyObject *) PyExc_ImportError;
-extern DL_IMPORT(PyObject *) PyExc_IndexError;
-extern DL_IMPORT(PyObject *) PyExc_KeyError;
-extern DL_IMPORT(PyObject *) PyExc_KeyboardInterrupt;
-extern DL_IMPORT(PyObject *) PyExc_MemoryError;
-extern DL_IMPORT(PyObject *) PyExc_NameError;
-extern DL_IMPORT(PyObject *) PyExc_OverflowError;
-extern DL_IMPORT(PyObject *) PyExc_RuntimeError;
-extern DL_IMPORT(PyObject *) PyExc_NotImplementedError;
-extern DL_IMPORT(PyObject *) PyExc_SyntaxError;
-extern DL_IMPORT(PyObject *) PyExc_IndentationError;
-extern DL_IMPORT(PyObject *) PyExc_TabError;
-extern DL_IMPORT(PyObject *) PyExc_ReferenceError;
-extern DL_IMPORT(PyObject *) PyExc_SystemError;
-extern DL_IMPORT(PyObject *) PyExc_SystemExit;
-extern DL_IMPORT(PyObject *) PyExc_TypeError;
-extern DL_IMPORT(PyObject *) PyExc_UnboundLocalError;
-extern DL_IMPORT(PyObject *) PyExc_UnicodeError;
-extern DL_IMPORT(PyObject *) PyExc_ValueError;
-extern DL_IMPORT(PyObject *) PyExc_ZeroDivisionError;
+PyAPI_DATA(PyObject *) PyExc_Exception;
+PyAPI_DATA(PyObject *) PyExc_StopIteration;
+PyAPI_DATA(PyObject *) PyExc_StandardError;
+PyAPI_DATA(PyObject *) PyExc_ArithmeticError;
+PyAPI_DATA(PyObject *) PyExc_LookupError;
+
+PyAPI_DATA(PyObject *) PyExc_AssertionError;
+PyAPI_DATA(PyObject *) PyExc_AttributeError;
+PyAPI_DATA(PyObject *) PyExc_EOFError;
+PyAPI_DATA(PyObject *) PyExc_FloatingPointError;
+PyAPI_DATA(PyObject *) PyExc_EnvironmentError;
+PyAPI_DATA(PyObject *) PyExc_IOError;
+PyAPI_DATA(PyObject *) PyExc_OSError;
+PyAPI_DATA(PyObject *) PyExc_ImportError;
+PyAPI_DATA(PyObject *) PyExc_IndexError;
+PyAPI_DATA(PyObject *) PyExc_KeyError;
+PyAPI_DATA(PyObject *) PyExc_KeyboardInterrupt;
+PyAPI_DATA(PyObject *) PyExc_MemoryError;
+PyAPI_DATA(PyObject *) PyExc_NameError;
+PyAPI_DATA(PyObject *) PyExc_OverflowError;
+PyAPI_DATA(PyObject *) PyExc_RuntimeError;
+PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
+PyAPI_DATA(PyObject *) PyExc_SyntaxError;
+PyAPI_DATA(PyObject *) PyExc_IndentationError;
+PyAPI_DATA(PyObject *) PyExc_TabError;
+PyAPI_DATA(PyObject *) PyExc_ReferenceError;
+PyAPI_DATA(PyObject *) PyExc_SystemError;
+PyAPI_DATA(PyObject *) PyExc_SystemExit;
+PyAPI_DATA(PyObject *) PyExc_TypeError;
+PyAPI_DATA(PyObject *) PyExc_UnboundLocalError;
+PyAPI_DATA(PyObject *) PyExc_UnicodeError;
+PyAPI_DATA(PyObject *) PyExc_ValueError;
+PyAPI_DATA(PyObject *) PyExc_ZeroDivisionError;
#ifdef MS_WINDOWS
-extern DL_IMPORT(PyObject *) PyExc_WindowsError;
+PyAPI_DATA(PyObject *) PyExc_WindowsError;
#endif
-extern DL_IMPORT(PyObject *) PyExc_MemoryErrorInst;
+PyAPI_DATA(PyObject *) PyExc_MemoryErrorInst;
/* Predefined warning categories */
-extern DL_IMPORT(PyObject *) PyExc_Warning;
-extern DL_IMPORT(PyObject *) PyExc_UserWarning;
-extern DL_IMPORT(PyObject *) PyExc_DeprecationWarning;
-extern DL_IMPORT(PyObject *) PyExc_PendingDeprecationWarning;
-extern DL_IMPORT(PyObject *) PyExc_SyntaxWarning;
-extern DL_IMPORT(PyObject *) PyExc_OverflowWarning;
-extern DL_IMPORT(PyObject *) PyExc_RuntimeWarning;
+PyAPI_DATA(PyObject *) PyExc_Warning;
+PyAPI_DATA(PyObject *) PyExc_UserWarning;
+PyAPI_DATA(PyObject *) PyExc_DeprecationWarning;
+PyAPI_DATA(PyObject *) PyExc_PendingDeprecationWarning;
+PyAPI_DATA(PyObject *) PyExc_SyntaxWarning;
+PyAPI_DATA(PyObject *) PyExc_OverflowWarning;
+PyAPI_DATA(PyObject *) PyExc_RuntimeWarning;
/* Convenience functions */
-extern DL_IMPORT(int) PyErr_BadArgument(void);
-extern DL_IMPORT(PyObject *) PyErr_NoMemory(void);
-extern DL_IMPORT(PyObject *) PyErr_SetFromErrno(PyObject *);
-extern DL_IMPORT(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *);
-extern DL_IMPORT(PyObject *) PyErr_Format(PyObject *, const char *, ...)
+PyAPI_FUNC(int) PyErr_BadArgument(void);
+PyAPI_FUNC(PyObject *) PyErr_NoMemory(void);
+PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *);
+PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *);
+PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...)
__attribute__((format(printf, 2, 3)));
#ifdef MS_WINDOWS
-extern DL_IMPORT(PyObject *) PyErr_SetFromWindowsErrWithFilename(int, const char *);
-extern DL_IMPORT(PyObject *) PyErr_SetFromWindowsErr(int);
-extern DL_IMPORT(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
+PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(int, const char *);
+PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
+PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
PyObject *,int, const char *);
-extern DL_IMPORT(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
+PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
#endif
/* Export the old function so that the existing API remains available: */
-extern DL_IMPORT(void) PyErr_BadInternalCall(void);
-extern DL_IMPORT(void) _PyErr_BadInternalCall(char *filename, int lineno);
+PyAPI_FUNC(void) PyErr_BadInternalCall(void);
+PyAPI_FUNC(void) _PyErr_BadInternalCall(char *filename, int lineno);
/* Mask the old API with a call to the new API for code compiled under
Python 2.0: */
#define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
/* Function to create a new exception */
-DL_IMPORT(PyObject *) PyErr_NewException(char *name, PyObject *base,
+PyAPI_FUNC(PyObject *) PyErr_NewException(char *name, PyObject *base,
PyObject *dict);
-extern DL_IMPORT(void) PyErr_WriteUnraisable(PyObject *);
+PyAPI_FUNC(void) PyErr_WriteUnraisable(PyObject *);
/* Issue a warning or exception */
-extern DL_IMPORT(int) PyErr_Warn(PyObject *, char *);
-extern DL_IMPORT(int) PyErr_WarnExplicit(PyObject *, char *,
+PyAPI_FUNC(int) PyErr_Warn(PyObject *, char *);
+PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject *, char *,
char *, int, char *, PyObject *);
/* In sigcheck.c or signalmodule.c */
-extern DL_IMPORT(int) PyErr_CheckSignals(void);
-extern DL_IMPORT(void) PyErr_SetInterrupt(void);
+PyAPI_FUNC(int) PyErr_CheckSignals(void);
+PyAPI_FUNC(void) PyErr_SetInterrupt(void);
/* Support for adding program text to SyntaxErrors */
-extern DL_IMPORT(void) PyErr_SyntaxLocation(char *, int);
-extern DL_IMPORT(PyObject *) PyErr_ProgramText(char *, int);
+PyAPI_FUNC(void) PyErr_SyntaxLocation(char *, int);
+PyAPI_FUNC(PyObject *) PyErr_ProgramText(char *, int);
/* These APIs aren't really part of the error implementation, but
often needed to format error messages; the native C lib APIs are
@@ -128,9 +128,9 @@ extern DL_IMPORT(PyObject *) PyErr_ProgramText(char *, int);
#endif
#include <stdarg.h>
-extern DL_IMPORT(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
+PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
__attribute__((format(printf, 3, 4)));
-extern DL_IMPORT(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
+PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
__attribute__((format(printf, 3, 0)));
#ifdef __cplusplus