diff options
author | Guido van Rossum <guido@python.org> | 1995-02-27 10:17:52 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-02-27 10:17:52 (GMT) |
commit | 051ab123b465685e714668099c0a6dd86de5673b (patch) | |
tree | 16ee109ab64b01f19e289a3c284c7ce9b70618fa /Include | |
parent | 0fbec64c56e5f2644b4e23a458a42ca273fd4888 (diff) | |
download | cpython-051ab123b465685e714668099c0a6dd86de5673b.zip cpython-051ab123b465685e714668099c0a6dd86de5673b.tar.gz cpython-051ab123b465685e714668099c0a6dd86de5673b.tar.bz2 |
make the type a parameter of the DL_IMPORT macro, for Borland C
Diffstat (limited to 'Include')
-rw-r--r-- | Include/accessobject.h | 4 | ||||
-rw-r--r-- | Include/allobjects.h | 8 | ||||
-rw-r--r-- | Include/classobject.h | 2 | ||||
-rw-r--r-- | Include/compile.h | 2 | ||||
-rwxr-xr-x | Include/errors.h | 38 | ||||
-rw-r--r-- | Include/fileobject.h | 2 | ||||
-rw-r--r-- | Include/floatobject.h | 2 | ||||
-rw-r--r-- | Include/frameobject.h | 2 | ||||
-rw-r--r-- | Include/funcobject.h | 2 | ||||
-rw-r--r-- | Include/intobject.h | 4 | ||||
-rw-r--r-- | Include/listobject.h | 2 | ||||
-rw-r--r-- | Include/longobject.h | 2 | ||||
-rw-r--r-- | Include/mappingobject.h | 2 | ||||
-rw-r--r-- | Include/methodobject.h | 2 | ||||
-rw-r--r-- | Include/moduleobject.h | 2 | ||||
-rw-r--r-- | Include/object.h | 4 | ||||
-rw-r--r-- | Include/osdefs.h | 2 | ||||
-rw-r--r-- | Include/pyerrors.h | 38 | ||||
-rw-r--r-- | Include/rangeobject.h | 2 | ||||
-rw-r--r-- | Include/stringobject.h | 2 | ||||
-rw-r--r-- | Include/sysmodule.h | 4 | ||||
-rw-r--r-- | Include/tupleobject.h | 2 |
22 files changed, 67 insertions, 63 deletions
diff --git a/Include/accessobject.h b/Include/accessobject.h index 47f9895..0ea60fc 100644 --- a/Include/accessobject.h +++ b/Include/accessobject.h @@ -46,7 +46,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define AC_R_PUBLIC 0004 #define AC_W_PUBLIC 0002 -extern DL_IMPORT PyTypeObject PyAccess_Type; +extern DL_IMPORT(PyTypeObject) PyAccess_Type; #define PyAccess_Check(v) ((v)->ob_type == &PyAccess_Type) @@ -58,7 +58,7 @@ void PyAccess_SetOwner Py_PROTO((PyObject *, PyObject *)); PyObject *PyAccess_Clone Py_PROTO((PyObject *)); int PyAccess_HasValue Py_PROTO((PyObject *)); -extern DL_IMPORT PyTypeObject PyAnyNumber_Type, PyAnySequence_Type, PyAnyMapping_Type; +extern DL_IMPORT(PyTypeObject) PyAnyNumber_Type, PyAnySequence_Type, PyAnyMapping_Type; #ifdef __cplusplus } diff --git a/Include/allobjects.h b/Include/allobjects.h index 6dbdb1e..b156e2e 100644 --- a/Include/allobjects.h +++ b/Include/allobjects.h @@ -35,12 +35,16 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. only turned on for the modules built as DL modules, not for python itself. */ -#define DL_IMPORT /* Save lots of #else/#if's */ +#define DL_IMPORT( RTYPE ) RTYPE /* Save lots of #else/#if's */ #ifdef USE_DL_IMPORT #ifdef NT #undef DL_IMPORT -#define DL_IMPORT __declspec(dllimport) +#define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE #endif /* NT */ +#ifdef __BORLANDC__ +#undef DL_IMPORT +#define DL_IMPORT(RTYPE) RTYPE __import +#endif /* BORLANDC */ #endif /* USE_DL_IMPORT */ #ifdef HAVE_CONFIG_H diff --git a/Include/classobject.h b/Include/classobject.h index 9810009..f87d02e 100644 --- a/Include/classobject.h +++ b/Include/classobject.h @@ -55,7 +55,7 @@ typedef struct { PyObject *in_dict; /* A dictionary */ } PyInstanceObject; -extern DL_IMPORT PyTypeObject PyClass_Type, PyInstance_Type, PyMethod_Type; +extern DL_IMPORT(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type; #define PyClass_Check(op) ((op)->ob_type == &PyClass_Type) #define PyInstance_Check(op) ((op)->ob_type == &PyInstance_Type) diff --git a/Include/compile.h b/Include/compile.h index 4513d28..f311a4b 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -47,7 +47,7 @@ typedef struct { PyObject *co_name; /* string */ } PyCodeObject; -extern DL_IMPORT PyTypeObject PyCode_Type; +extern DL_IMPORT(PyTypeObject) PyCode_Type; #define PyCode_Check(op) ((op)->ob_type == &PyCode_Type) diff --git a/Include/errors.h b/Include/errors.h index 893bc90..3307b36 100755 --- a/Include/errors.h +++ b/Include/errors.h @@ -40,25 +40,25 @@ void PyErr_Restore Py_PROTO((PyObject *, PyObject *, PyObject *)); /* Predefined exceptions */ -extern DL_IMPORT PyObject *PyExc_AccessError; -extern DL_IMPORT PyObject *PyExc_AttributeError; -extern DL_IMPORT PyObject *PyExc_ConflictError; -extern DL_IMPORT PyObject *PyExc_EOFError; -extern DL_IMPORT PyObject *PyExc_IOError; -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_SyntaxError; -extern DL_IMPORT PyObject *PyExc_SystemError; -extern DL_IMPORT PyObject *PyExc_SystemExit; -extern DL_IMPORT PyObject *PyExc_TypeError; -extern DL_IMPORT PyObject *PyExc_ValueError; -extern DL_IMPORT PyObject *PyExc_ZeroDivisionError; +extern DL_IMPORT(PyObject *) PyExc_AccessError; +extern DL_IMPORT(PyObject *) PyExc_AttributeError; +extern DL_IMPORT(PyObject *) PyExc_ConflictError; +extern DL_IMPORT(PyObject *) PyExc_EOFError; +extern DL_IMPORT(PyObject *) PyExc_IOError; +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_SyntaxError; +extern DL_IMPORT(PyObject *) PyExc_SystemError; +extern DL_IMPORT(PyObject *) PyExc_SystemExit; +extern DL_IMPORT(PyObject *) PyExc_TypeError; +extern DL_IMPORT(PyObject *) PyExc_ValueError; +extern DL_IMPORT(PyObject *) PyExc_ZeroDivisionError; /* Convenience functions */ diff --git a/Include/fileobject.h b/Include/fileobject.h index 85c98c6..9346624 100644 --- a/Include/fileobject.h +++ b/Include/fileobject.h @@ -30,7 +30,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* File object interface */ -extern DL_IMPORT PyTypeObject PyFile_Type; +extern DL_IMPORT(PyTypeObject) PyFile_Type; #define PyFile_Check(op) ((op)->ob_type == &PyFile_Type) diff --git a/Include/floatobject.h b/Include/floatobject.h index 2feb0bc..ba23f77 100644 --- a/Include/floatobject.h +++ b/Include/floatobject.h @@ -39,7 +39,7 @@ typedef struct { double ob_fval; } PyFloatObject; -extern DL_IMPORT PyTypeObject PyFloat_Type; +extern DL_IMPORT(PyTypeObject) PyFloat_Type; #define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type) diff --git a/Include/frameobject.h b/Include/frameobject.h index 949016a..e0c94e0 100644 --- a/Include/frameobject.h +++ b/Include/frameobject.h @@ -61,7 +61,7 @@ typedef struct _frame { /* Standard object interface */ -extern DL_IMPORT PyTypeObject PyFrame_Type; +extern DL_IMPORT(PyTypeObject) PyFrame_Type; #define PyFrame_Check(op) ((op)->ob_type == &PyFrame_Type) diff --git a/Include/funcobject.h b/Include/funcobject.h index d33cad7..f618363 100644 --- a/Include/funcobject.h +++ b/Include/funcobject.h @@ -40,7 +40,7 @@ typedef struct { PyObject *func_doc; } PyFunctionObject; -extern DL_IMPORT PyTypeObject PyFunction_Type; +extern DL_IMPORT(PyTypeObject) PyFunction_Type; #define PyFunction_Check(op) ((op)->ob_type == &PyFunction_Type) diff --git a/Include/intobject.h b/Include/intobject.h index 6e2344a..24bcbf0 100644 --- a/Include/intobject.h +++ b/Include/intobject.h @@ -50,7 +50,7 @@ typedef struct { long ob_ival; } PyIntObject; -extern DL_IMPORT PyTypeObject PyInt_Type; +extern DL_IMPORT(PyTypeObject) PyInt_Type; #define PyInt_Check(op) ((op)->ob_type == &PyInt_Type) @@ -69,7 +69,7 @@ Hope these macros don't conflict with other people's. Don't forget to apply Py_INCREF() when returning True or False!!! */ -extern DL_IMPORT PyIntObject _Py_ZeroStruct, _Py_TrueStruct; /* Don't use these directly */ +extern DL_IMPORT(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; /* Don't use these directly */ #define Py_False ((PyObject *) &_Py_ZeroStruct) #define Py_True ((PyObject *) &_Py_TrueStruct) diff --git a/Include/listobject.h b/Include/listobject.h index 8e5e973..76b49be 100644 --- a/Include/listobject.h +++ b/Include/listobject.h @@ -49,7 +49,7 @@ typedef struct { PyObject **ob_item; } PyListObject; -extern DL_IMPORT PyTypeObject PyList_Type; +extern DL_IMPORT(PyTypeObject) PyList_Type; #define PyList_Check(op) ((op)->ob_type == &PyList_Type) diff --git a/Include/longobject.h b/Include/longobject.h index 2a34417..77e5efe 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -32,7 +32,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */ -extern DL_IMPORT PyTypeObject PyLong_Type; +extern DL_IMPORT(PyTypeObject) PyLong_Type; #define PyLong_Check(op) ((op)->ob_type == &PyLong_Type) diff --git a/Include/mappingobject.h b/Include/mappingobject.h index f8e838c..584ee5a 100644 --- a/Include/mappingobject.h +++ b/Include/mappingobject.h @@ -31,7 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Dictionary object type -- mapping from hashable object to object */ /* NB Should be moved back to dictobject.h */ -extern DL_IMPORT PyTypeObject PyDict_Type; +extern DL_IMPORT(PyTypeObject) PyDict_Type; #define PyDict_Check(op) ((op)->ob_type == &PyDict_Type) diff --git a/Include/methodobject.h b/Include/methodobject.h index 946d004..cbe3270 100644 --- a/Include/methodobject.h +++ b/Include/methodobject.h @@ -30,7 +30,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Method object interface */ -extern DL_IMPORT PyTypeObject PyCFunction_Type; +extern DL_IMPORT(PyTypeObject) PyCFunction_Type; #define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type) diff --git a/Include/moduleobject.h b/Include/moduleobject.h index 277f95d..f8eea9c 100644 --- a/Include/moduleobject.h +++ b/Include/moduleobject.h @@ -30,7 +30,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Module object interface */ -extern DL_IMPORT PyTypeObject PyModule_Type; +extern DL_IMPORT(PyTypeObject) PyModule_Type; #define PyModule_Check(op) ((op)->ob_type == &PyModule_Type) diff --git a/Include/object.h b/Include/object.h index 9c9b689..0b679d5 100644 --- a/Include/object.h +++ b/Include/object.h @@ -237,7 +237,7 @@ typedef struct _typeobject { #endif } PyTypeObject; -extern DL_IMPORT PyTypeObject PyType_Type; /* The type of type objects */ +extern DL_IMPORT(PyTypeObject) PyType_Type; /* The type of type objects */ #define PyType_Check(op) ((op)->ob_type == &PyType_Type) @@ -353,7 +353,7 @@ where NULL (nil) is not suitable (since NULL often means 'error'). Don't forget to apply Py_INCREF() when returning this value!!! */ -extern DL_IMPORT PyObject _Py_NoneStruct; /* Don't use this directly */ +extern DL_IMPORT(PyObject) _Py_NoneStruct; /* Don't use this directly */ #define Py_None (&_Py_NoneStruct) diff --git a/Include/osdefs.h b/Include/osdefs.h index 25c9c36..0c279f2 100644 --- a/Include/osdefs.h +++ b/Include/osdefs.h @@ -37,7 +37,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define DELIM '\n' #endif -#if defined(MSDOS) || defined(NT) +#if defined(MSDOS) || defined(NT) || defined(__BORLANDC__) #define SEP '\\' #define MAXPATHLEN 256 #define DELIM ';' diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 893bc90..3307b36 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -40,25 +40,25 @@ void PyErr_Restore Py_PROTO((PyObject *, PyObject *, PyObject *)); /* Predefined exceptions */ -extern DL_IMPORT PyObject *PyExc_AccessError; -extern DL_IMPORT PyObject *PyExc_AttributeError; -extern DL_IMPORT PyObject *PyExc_ConflictError; -extern DL_IMPORT PyObject *PyExc_EOFError; -extern DL_IMPORT PyObject *PyExc_IOError; -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_SyntaxError; -extern DL_IMPORT PyObject *PyExc_SystemError; -extern DL_IMPORT PyObject *PyExc_SystemExit; -extern DL_IMPORT PyObject *PyExc_TypeError; -extern DL_IMPORT PyObject *PyExc_ValueError; -extern DL_IMPORT PyObject *PyExc_ZeroDivisionError; +extern DL_IMPORT(PyObject *) PyExc_AccessError; +extern DL_IMPORT(PyObject *) PyExc_AttributeError; +extern DL_IMPORT(PyObject *) PyExc_ConflictError; +extern DL_IMPORT(PyObject *) PyExc_EOFError; +extern DL_IMPORT(PyObject *) PyExc_IOError; +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_SyntaxError; +extern DL_IMPORT(PyObject *) PyExc_SystemError; +extern DL_IMPORT(PyObject *) PyExc_SystemExit; +extern DL_IMPORT(PyObject *) PyExc_TypeError; +extern DL_IMPORT(PyObject *) PyExc_ValueError; +extern DL_IMPORT(PyObject *) PyExc_ZeroDivisionError; /* Convenience functions */ diff --git a/Include/rangeobject.h b/Include/rangeobject.h index f8b466c..949e710 100644 --- a/Include/rangeobject.h +++ b/Include/rangeobject.h @@ -32,7 +32,7 @@ Range objects behave like the corresponding tuple objects except that they are represented by a start, stop, and step datamembers. */ -extern DL_IMPORT PyTypeObject PyRange_Type; +extern DL_IMPORT(PyTypeObject) PyRange_Type; #define PyRange_Check(op) ((op)->ob_type == &PyRange_Type) diff --git a/Include/stringobject.h b/Include/stringobject.h index d3b6ce4..f5ebe78 100644 --- a/Include/stringobject.h +++ b/Include/stringobject.h @@ -55,7 +55,7 @@ typedef struct { char ob_sval[1]; } PyStringObject; -extern DL_IMPORT PyTypeObject PyString_Type; +extern DL_IMPORT(PyTypeObject) PyString_Type; #define PyString_Check(op) ((op)->ob_type == &PyString_Type) diff --git a/Include/sysmodule.h b/Include/sysmodule.h index 8d31748..29e7bff 100644 --- a/Include/sysmodule.h +++ b/Include/sysmodule.h @@ -35,8 +35,8 @@ int PySys_SetObject Py_PROTO((char *, PyObject *)); FILE *PySys_GetFile Py_PROTO((char *, FILE *)); void PySys_Init Py_PROTO((void)); -extern DL_IMPORT PyObject *_PySys_TraceFunc, *_PySys_ProfileFunc; -extern DL_IMPORT int _PySys_CheckInterval; +extern DL_IMPORT(PyObject *) _PySys_TraceFunc, *_PySys_ProfileFunc; +extern DL_IMPORT(int) _PySys_CheckInterval; #ifdef __cplusplus } diff --git a/Include/tupleobject.h b/Include/tupleobject.h index ff60672..da76891 100644 --- a/Include/tupleobject.h +++ b/Include/tupleobject.h @@ -49,7 +49,7 @@ typedef struct { PyObject *ob_item[1]; } PyTupleObject; -extern DL_IMPORT PyTypeObject PyTuple_Type; +extern DL_IMPORT(PyTypeObject) PyTuple_Type; #define PyTuple_Check(op) ((op)->ob_type == &PyTuple_Type) |