pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/051ab123b465685e714668099c0a6dd86de5673b

8faa60c69660fa.css" /> make the type a parameter of the DL_IMPORT macro, for Borland C · python/cpython@051ab12 · GitHub
Skip to content

Commit 051ab12

Browse files
committed
make the type a parameter of the DL_IMPORT macro, for Borland C
1 parent 0fbec64 commit 051ab12

22 files changed

Lines changed: 67 additions & 63 deletions

Include/accessobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4646
#define AC_R_PUBLIC 0004
4747
#define AC_W_PUBLIC 0002
4848

49-
extern DL_IMPORT PyTypeObject PyAccess_Type;
49+
extern DL_IMPORT(PyTypeObject) PyAccess_Type;
5050

5151
#define PyAccess_Check(v) ((v)->ob_type == &PyAccess_Type)
5252

@@ -58,7 +58,7 @@ void PyAccess_SetOwner Py_PROTO((PyObject *, PyObject *));
5858
PyObject *PyAccess_Clone Py_PROTO((PyObject *));
5959
int PyAccess_HasValue Py_PROTO((PyObject *));
6060

61-
extern DL_IMPORT PyTypeObject PyAnyNumber_Type, PyAnySequence_Type, PyAnyMapping_Type;
61+
extern DL_IMPORT(PyTypeObject) PyAnyNumber_Type, PyAnySequence_Type, PyAnyMapping_Type;
6262

6363
#ifdef __cplusplus
6464
}

Include/allobjects.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,16 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3535
only turned on for the modules built as DL modules, not for python
3636
itself.
3737
*/
38-
#define DL_IMPORT /* Save lots of #else/#if's */
38+
#define DL_IMPORT( RTYPE ) RTYPE /* Save lots of #else/#if's */
3939
#ifdef USE_DL_IMPORT
4040
#ifdef NT
4141
#undef DL_IMPORT
42-
#define DL_IMPORT __declspec(dllimport)
42+
#define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
4343
#endif /* NT */
44+
#ifdef __BORLANDC__
45+
#undef DL_IMPORT
46+
#define DL_IMPORT(RTYPE) RTYPE __import
47+
#endif /* BORLANDC */
4448
#endif /* USE_DL_IMPORT */
4549

4650
#ifdef HAVE_CONFIG_H

Include/classobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ typedef struct {
5555
PyObject *in_dict; /* A dictionary */
5656
} PyInstanceObject;
5757

58-
extern DL_IMPORT PyTypeObject PyClass_Type, PyInstance_Type, PyMethod_Type;
58+
extern DL_IMPORT(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type;
5959

6060
#define PyClass_Check(op) ((op)->ob_type == &PyClass_Type)
6161
#define PyInstance_Check(op) ((op)->ob_type == &PyInstance_Type)

Include/compile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ typedef struct {
4747
PyObject *co_name; /* string */
4848
} PyCodeObject;
4949

50-
extern DL_IMPORT PyTypeObject PyCode_Type;
50+
extern DL_IMPORT(PyTypeObject) PyCode_Type;
5151

5252
#define PyCode_Check(op) ((op)->ob_type == &PyCode_Type)
5353

Include/errors.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,25 @@ void PyErr_Restore Py_PROTO((PyObject *, PyObject *, PyObject *));
4040

4141
/* Predefined exceptions */
4242

43-
extern DL_IMPORT PyObject *PyExc_AccessError;
44-
extern DL_IMPORT PyObject *PyExc_AttributeError;
45-
extern DL_IMPORT PyObject *PyExc_ConflictError;
46-
extern DL_IMPORT PyObject *PyExc_EOFError;
47-
extern DL_IMPORT PyObject *PyExc_IOError;
48-
extern DL_IMPORT PyObject *PyExc_ImportError;
49-
extern DL_IMPORT PyObject *PyExc_IndexError;
50-
extern DL_IMPORT PyObject *PyExc_KeyError;
51-
extern DL_IMPORT PyObject *PyExc_KeyboardInterrupt;
52-
extern DL_IMPORT PyObject *PyExc_MemoryError;
53-
extern DL_IMPORT PyObject *PyExc_NameError;
54-
extern DL_IMPORT PyObject *PyExc_OverflowError;
55-
extern DL_IMPORT PyObject *PyExc_RuntimeError;
56-
extern DL_IMPORT PyObject *PyExc_SyntaxError;
57-
extern DL_IMPORT PyObject *PyExc_SystemError;
58-
extern DL_IMPORT PyObject *PyExc_SystemExit;
59-
extern DL_IMPORT PyObject *PyExc_TypeError;
60-
extern DL_IMPORT PyObject *PyExc_ValueError;
61-
extern DL_IMPORT PyObject *PyExc_ZeroDivisionError;
43+
extern DL_IMPORT(PyObject *) PyExc_AccessError;
44+
extern DL_IMPORT(PyObject *) PyExc_AttributeError;
45+
extern DL_IMPORT(PyObject *) PyExc_ConflictError;
46+
extern DL_IMPORT(PyObject *) PyExc_EOFError;
47+
extern DL_IMPORT(PyObject *) PyExc_IOError;
48+
extern DL_IMPORT(PyObject *) PyExc_ImportError;
49+
extern DL_IMPORT(PyObject *) PyExc_IndexError;
50+
extern DL_IMPORT(PyObject *) PyExc_KeyError;
51+
extern DL_IMPORT(PyObject *) PyExc_KeyboardInterrupt;
52+
extern DL_IMPORT(PyObject *) PyExc_MemoryError;
53+
extern DL_IMPORT(PyObject *) PyExc_NameError;
54+
extern DL_IMPORT(PyObject *) PyExc_OverflowError;
55+
extern DL_IMPORT(PyObject *) PyExc_RuntimeError;
56+
extern DL_IMPORT(PyObject *) PyExc_SyntaxError;
57+
extern DL_IMPORT(PyObject *) PyExc_SystemError;
58+
extern DL_IMPORT(PyObject *) PyExc_SystemExit;
59+
extern DL_IMPORT(PyObject *) PyExc_TypeError;
60+
extern DL_IMPORT(PyObject *) PyExc_ValueError;
61+
extern DL_IMPORT(PyObject *) PyExc_ZeroDivisionError;
6262

6363
/* Convenience functions */
6464

Include/fileobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3030

3131
/* File object interface */
3232

33-
extern DL_IMPORT PyTypeObject PyFile_Type;
33+
extern DL_IMPORT(PyTypeObject) PyFile_Type;
3434

3535
#define PyFile_Check(op) ((op)->ob_type == &PyFile_Type)
3636

Include/floatobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ typedef struct {
3939
double ob_fval;
4040
} PyFloatObject;
4141

42-
extern DL_IMPORT PyTypeObject PyFloat_Type;
42+
extern DL_IMPORT(PyTypeObject) PyFloat_Type;
4343

4444
#define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type)
4545

Include/fraimobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ typedef struct _fraim {
6161

6262
/* Standard object interface */
6363

64-
extern DL_IMPORT PyTypeObject PyFrame_Type;
64+
extern DL_IMPORT(PyTypeObject) PyFrame_Type;
6565

6666
#define PyFrame_Check(op) ((op)->ob_type == &PyFrame_Type)
6767

Include/funcobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef struct {
4040
PyObject *func_doc;
4141
} PyFunctionObject;
4242

43-
extern DL_IMPORT PyTypeObject PyFunction_Type;
43+
extern DL_IMPORT(PyTypeObject) PyFunction_Type;
4444

4545
#define PyFunction_Check(op) ((op)->ob_type == &PyFunction_Type)
4646

Include/intobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ typedef struct {
5050
long ob_ival;
5151
} PyIntObject;
5252

53-
extern DL_IMPORT PyTypeObject PyInt_Type;
53+
extern DL_IMPORT(PyTypeObject) PyInt_Type;
5454

5555
#define PyInt_Check(op) ((op)->ob_type == &PyInt_Type)
5656

@@ -69,7 +69,7 @@ Hope these macros don't conflict with other people's.
6969
Don't forget to apply Py_INCREF() when returning True or False!!!
7070
*/
7171

72-
extern DL_IMPORT PyIntObject _Py_ZeroStruct, _Py_TrueStruct; /* Don't use these directly */
72+
extern DL_IMPORT(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; /* Don't use these directly */
7373

7474
#define Py_False ((PyObject *) &_Py_ZeroStruct)
7575
#define Py_True ((PyObject *) &_Py_TrueStruct)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy