[Python-checkins] python/dist/src/Include import.h,2.28,2.29 object.h,2.108,2.109 pydebug.h,2.20,2.21 pyport.h,2.52,2.53 pythonrun.h,2.50,2.51
mhammond@users.sourceforge.net
mhammond@users.sourceforge.net
Mon, 29 Jul 2002 06:42:42 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv1122/Include
Modified Files:
import.h object.h pydebug.h pyport.h pythonrun.h
Log Message:
Excise DL_IMPORT/EXPORT from object.h, and related files. This patch
also adds 'extern' to PyAPI_DATA rather than at each declaration, as
discussed with Tim and Guido.
Index: import.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/import.h,v
retrieving revision 2.28
retrieving revision 2.29
diff -C2 -d -r2.28 -r2.29
*** import.h 19 Jul 2002 06:55:41 -0000 2.28
--- import.h 29 Jul 2002 13:41:59 -0000 2.29
***************
*** 22,27 ****
PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *);
! extern PyAPI_FUNC(PyObject *)_PyImport_FindExtension(char *, char *);
! extern PyAPI_FUNC(PyObject *)_PyImport_FixupExtension(char *, char *);
struct _inittab {
--- 22,27 ----
PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *);
! PyAPI_FUNC(PyObject *)_PyImport_FindExtension(char *, char *);
! PyAPI_FUNC(PyObject *)_PyImport_FixupExtension(char *, char *);
struct _inittab {
***************
*** 30,37 ****
};
! extern PyAPI_DATA(struct _inittab *) PyImport_Inittab;
! extern PyAPI_FUNC(int) PyImport_AppendInittab(char *name, void (*initfunc)(void));
! extern PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
struct _frozen {
--- 30,37 ----
};
! PyAPI_DATA(struct _inittab *) PyImport_Inittab;
! PyAPI_FUNC(int) PyImport_AppendInittab(char *name, void (*initfunc)(void));
! PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
struct _frozen {
***************
*** 44,48 ****
collection of frozen modules: */
! extern PyAPI_DATA(struct _frozen *) PyImport_FrozenModules;
#ifdef __cplusplus
--- 44,48 ----
collection of frozen modules: */
! PyAPI_DATA(struct _frozen *) PyImport_FrozenModules;
#ifdef __cplusplus
Index: object.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/object.h,v
retrieving revision 2.108
retrieving revision 2.109
diff -C2 -d -r2.108 -r2.109
*** object.h 17 Jul 2002 16:30:34 -0000 2.108
--- object.h 29 Jul 2002 13:42:00 -0000 2.109
***************
*** 328,377 ****
/* Generic type check */
! extern DL_IMPORT(int) PyType_IsSubtype(PyTypeObject *, PyTypeObject *);
#define PyObject_TypeCheck(ob, tp) \
((ob)->ob_type == (tp) || PyType_IsSubtype((ob)->ob_type, (tp)))
! extern DL_IMPORT(PyTypeObject) PyType_Type; /* built-in 'type' */
! extern DL_IMPORT(PyTypeObject) PyBaseObject_Type; /* built-in 'object' */
! extern DL_IMPORT(PyTypeObject) PySuper_Type; /* built-in 'super' */
#define PyType_Check(op) PyObject_TypeCheck(op, &PyType_Type)
#define PyType_CheckExact(op) ((op)->ob_type == &PyType_Type)
! extern DL_IMPORT(int) PyType_Ready(PyTypeObject *);
! extern DL_IMPORT(PyObject *) PyType_GenericAlloc(PyTypeObject *, int);
! extern DL_IMPORT(PyObject *) PyType_GenericNew(PyTypeObject *,
PyObject *, PyObject *);
! extern DL_IMPORT(PyObject *) _PyType_Lookup(PyTypeObject *, PyObject *);
/* Generic operations on objects */
! extern DL_IMPORT(int) PyObject_Print(PyObject *, FILE *, int);
! extern DL_IMPORT(void) _PyObject_Dump(PyObject *);
! extern DL_IMPORT(PyObject *) PyObject_Repr(PyObject *);
! extern DL_IMPORT(PyObject *) PyObject_Str(PyObject *);
#ifdef Py_USING_UNICODE
! extern DL_IMPORT(PyObject *) PyObject_Unicode(PyObject *);
#endif
! extern DL_IMPORT(int) PyObject_Compare(PyObject *, PyObject *);
! extern DL_IMPORT(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);
! extern DL_IMPORT(int) PyObject_RichCompareBool(PyObject *, PyObject *, int);
! extern DL_IMPORT(PyObject *) PyObject_GetAttrString(PyObject *, char *);
! extern DL_IMPORT(int) PyObject_SetAttrString(PyObject *, char *, PyObject *);
! extern DL_IMPORT(int) PyObject_HasAttrString(PyObject *, char *);
! extern DL_IMPORT(PyObject *) PyObject_GetAttr(PyObject *, PyObject *);
! extern DL_IMPORT(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *);
! extern DL_IMPORT(int) PyObject_HasAttr(PyObject *, PyObject *);
! extern DL_IMPORT(PyObject **) _PyObject_GetDictPtr(PyObject *);
! extern DL_IMPORT(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *);
! extern DL_IMPORT(int) PyObject_GenericSetAttr(PyObject *,
PyObject *, PyObject *);
! extern DL_IMPORT(long) PyObject_Hash(PyObject *);
! extern DL_IMPORT(int) PyObject_IsTrue(PyObject *);
! extern DL_IMPORT(int) PyObject_Not(PyObject *);
! extern DL_IMPORT(int) PyCallable_Check(PyObject *);
! extern DL_IMPORT(int) PyNumber_Coerce(PyObject **, PyObject **);
! extern DL_IMPORT(int) PyNumber_CoerceEx(PyObject **, PyObject **);
! extern DL_IMPORT(void) PyObject_ClearWeakRefs(PyObject *);
/* A slot function whose address we need to compare */
--- 328,377 ----
/* Generic type check */
! PyAPI_FUNC(int) PyType_IsSubtype(PyTypeObject *, PyTypeObject *);
#define PyObject_TypeCheck(ob, tp) \
((ob)->ob_type == (tp) || PyType_IsSubtype((ob)->ob_type, (tp)))
! PyAPI_DATA(PyTypeObject) PyType_Type; /* built-in 'type' */
! PyAPI_DATA(PyTypeObject) PyBaseObject_Type; /* built-in 'object' */
! PyAPI_DATA(PyTypeObject) PySuper_Type; /* built-in 'super' */
#define PyType_Check(op) PyObject_TypeCheck(op, &PyType_Type)
#define PyType_CheckExact(op) ((op)->ob_type == &PyType_Type)
! PyAPI_FUNC(int) PyType_Ready(PyTypeObject *);
! PyAPI_FUNC(PyObject *) PyType_GenericAlloc(PyTypeObject *, int);
! PyAPI_FUNC(PyObject *) PyType_GenericNew(PyTypeObject *,
PyObject *, PyObject *);
! PyAPI_FUNC(PyObject *) _PyType_Lookup(PyTypeObject *, PyObject *);
/* Generic operations on objects */
! PyAPI_FUNC(int) PyObject_Print(PyObject *, FILE *, int);
! PyAPI_FUNC(void) _PyObject_Dump(PyObject *);
! PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
! PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *);
#ifdef Py_USING_UNICODE
! PyAPI_FUNC(PyObject *) PyObject_Unicode(PyObject *);
#endif
! PyAPI_FUNC(int) PyObject_Compare(PyObject *, PyObject *);
! PyAPI_FUNC(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);
! PyAPI_FUNC(int) PyObject_RichCompareBool(PyObject *, PyObject *, int);
! PyAPI_FUNC(PyObject *) PyObject_GetAttrString(PyObject *, char *);
! PyAPI_FUNC(int) PyObject_SetAttrString(PyObject *, char *, PyObject *);
! PyAPI_FUNC(int) PyObject_HasAttrString(PyObject *, char *);
! PyAPI_FUNC(PyObject *) PyObject_GetAttr(PyObject *, PyObject *);
! PyAPI_FUNC(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *);
! PyAPI_FUNC(int) PyObject_HasAttr(PyObject *, PyObject *);
! PyAPI_FUNC(PyObject **) _PyObject_GetDictPtr(PyObject *);
! PyAPI_FUNC(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *);
! PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *,
PyObject *, PyObject *);
! PyAPI_FUNC(long) PyObject_Hash(PyObject *);
! PyAPI_FUNC(int) PyObject_IsTrue(PyObject *);
! PyAPI_FUNC(int) PyObject_Not(PyObject *);
! PyAPI_FUNC(int) PyCallable_Check(PyObject *);
! PyAPI_FUNC(int) PyNumber_Coerce(PyObject **, PyObject **);
! PyAPI_FUNC(int) PyNumber_CoerceEx(PyObject **, PyObject **);
! PyAPI_FUNC(void) PyObject_ClearWeakRefs(PyObject *);
/* A slot function whose address we need to compare */
***************
*** 384,397 ****
no current locals, NULL is returned, and PyErr_Occurred() is false.
*/
! extern DL_IMPORT(PyObject *) PyObject_Dir(PyObject *);
/* Helpers for printing recursive container types */
! extern DL_IMPORT(int) Py_ReprEnter(PyObject *);
! extern DL_IMPORT(void) Py_ReprLeave(PyObject *);
/* Helpers for hash functions */
! extern DL_IMPORT(long) _Py_HashDouble(double);
! extern DL_IMPORT(long) _Py_HashPointer(void*);
/* Helper for passing objects to printf and the like */
--- 384,397 ----
no current locals, NULL is returned, and PyErr_Occurred() is false.
*/
! PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *);
/* Helpers for printing recursive container types */
! PyAPI_FUNC(int) Py_ReprEnter(PyObject *);
! PyAPI_FUNC(void) Py_ReprLeave(PyObject *);
/* Helpers for hash functions */
! PyAPI_FUNC(long) _Py_HashDouble(double);
! PyAPI_FUNC(long) _Py_HashPointer(void*);
/* Helper for passing objects to printf and the like */
***************
*** 522,527 ****
*/
#ifdef Py_REF_DEBUG
! extern DL_IMPORT(long) _Py_RefTotal;
! extern DL_IMPORT(void) _Py_NegativeRefcount(const char *fname,
int lineno, PyObject *op);
#define _Py_INC_REFTOTAL _Py_RefTotal++
--- 522,527 ----
*/
#ifdef Py_REF_DEBUG
! PyAPI_DATA(long) _Py_RefTotal;
! PyAPI_FUNC(void) _Py_NegativeRefcount(const char *fname,
int lineno, PyObject *op);
#define _Py_INC_REFTOTAL _Py_RefTotal++
***************
*** 541,545 ****
#ifdef COUNT_ALLOCS
! extern DL_IMPORT(void) inc_count(PyTypeObject *);
#define _Py_INC_TPALLOCS(OP) inc_count((OP)->ob_type)
#define _Py_INC_TPFREES(OP) (OP)->ob_type->tp_frees++
--- 541,545 ----
#ifdef COUNT_ALLOCS
! PyAPI_FUNC(void) inc_count(PyTypeObject *);
#define _Py_INC_TPALLOCS(OP) inc_count((OP)->ob_type)
#define _Py_INC_TPFREES(OP) (OP)->ob_type->tp_frees++
***************
*** 555,563 ****
#ifdef Py_TRACE_REFS
/* Py_TRACE_REFS is such major surgery that we call external routines. */
! extern DL_IMPORT(void) _Py_NewReference(PyObject *);
! extern DL_IMPORT(void) _Py_ForgetReference(PyObject *);
! extern DL_IMPORT(void) _Py_Dealloc(PyObject *);
! extern DL_IMPORT(void) _Py_PrintReferences(FILE *);
! extern DL_IMPORT(void) _Py_ResetReferences(void);
#else
--- 555,563 ----
#ifdef Py_TRACE_REFS
/* Py_TRACE_REFS is such major surgery that we call external routines. */
! PyAPI_FUNC(void) _Py_NewReference(PyObject *);
! PyAPI_FUNC(void) _Py_ForgetReference(PyObject *);
! PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
! PyAPI_FUNC(void) _Py_PrintReferences(FILE *);
! PyAPI_FUNC(void) _Py_ResetReferences(void);
#else
***************
*** 598,602 ****
Don't forget to apply Py_INCREF() when returning this value!!!
*/
! extern DL_IMPORT(PyObject) _Py_NoneStruct; /* Don't use this directly */
#define Py_None (&_Py_NoneStruct)
--- 598,602 ----
Don't forget to apply Py_INCREF() when returning this value!!!
*/
! PyAPI_DATA(PyObject) _Py_NoneStruct; /* Don't use this directly */
#define Py_None (&_Py_NoneStruct)
***************
*** 605,609 ****
not implemented for a given type combination.
*/
! extern DL_IMPORT(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */
#define Py_NotImplemented (&_Py_NotImplementedStruct)
--- 605,609 ----
not implemented for a given type combination.
*/
! PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */
#define Py_NotImplemented (&_Py_NotImplementedStruct)
***************
*** 721,728 ****
*/
! extern DL_IMPORT(void) _PyTrash_deposit_object(PyObject*);
! extern DL_IMPORT(void) _PyTrash_destroy_chain(void);
! extern DL_IMPORT(int) _PyTrash_delete_nesting;
! extern DL_IMPORT(PyObject *) _PyTrash_delete_later;
#define PyTrash_UNWIND_LEVEL 50
--- 721,728 ----
*/
! PyAPI_FUNC(void) _PyTrash_deposit_object(PyObject*);
! PyAPI_FUNC(void) _PyTrash_destroy_chain(void);
! PyAPI_DATA(int) _PyTrash_delete_nesting;
! PyAPI_DATA(PyObject *) _PyTrash_delete_later;
#define PyTrash_UNWIND_LEVEL 50
Index: pydebug.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pydebug.h,v
retrieving revision 2.20
retrieving revision 2.21
diff -C2 -d -r2.20 -r2.21
*** pydebug.h 9 Jul 2002 02:57:01 -0000 2.20
--- pydebug.h 29 Jul 2002 13:42:04 -0000 2.21
***************
*** 6,24 ****
#endif
! extern DL_IMPORT(int) Py_DebugFlag;
! extern DL_IMPORT(int) Py_VerboseFlag;
! extern DL_IMPORT(int) Py_InteractiveFlag;
! extern DL_IMPORT(int) Py_OptimizeFlag;
! extern DL_IMPORT(int) Py_NoSiteFlag;
! extern DL_IMPORT(int) Py_UseClassExceptionsFlag;
! extern DL_IMPORT(int) Py_FrozenFlag;
! extern DL_IMPORT(int) Py_TabcheckFlag;
! extern DL_IMPORT(int) Py_UnicodeFlag;
! extern DL_IMPORT(int) Py_IgnoreEnvironmentFlag;
! extern DL_IMPORT(int) Py_DivisionWarningFlag;
/* _XXX Py_QnewFlag should go away in 2.3. It's true iff -Qnew is passed,
on the command line, and is used in 2.2 by ceval.c to make all "/" divisions
true divisions (which they will be in 2.3). */
! extern DL_IMPORT(int) _Py_QnewFlag;
/* this is a wrapper around getenv() that pays attention to
--- 6,24 ----
#endif
! PyAPI_DATA(int) Py_DebugFlag;
! PyAPI_DATA(int) Py_VerboseFlag;
! PyAPI_DATA(int) Py_InteractiveFlag;
! PyAPI_DATA(int) Py_OptimizeFlag;
! PyAPI_DATA(int) Py_NoSiteFlag;
! PyAPI_DATA(int) Py_UseClassExceptionsFlag;
! PyAPI_DATA(int) Py_FrozenFlag;
! PyAPI_DATA(int) Py_TabcheckFlag;
! PyAPI_DATA(int) Py_UnicodeFlag;
! PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
! PyAPI_DATA(int) Py_DivisionWarningFlag;
/* _XXX Py_QnewFlag should go away in 2.3. It's true iff -Qnew is passed,
on the command line, and is used in 2.2 by ceval.c to make all "/" divisions
true divisions (which they will be in 2.3). */
! PyAPI_DATA(int) _Py_QnewFlag;
/* this is a wrapper around getenv() that pays attention to
***************
*** 27,31 ****
#define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
! DL_IMPORT(void) Py_FatalError(const char *message);
#ifdef __cplusplus
--- 27,31 ----
#define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
! PyAPI_FUNC(void) Py_FatalError(const char *message);
#ifdef __cplusplus
Index: pyport.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
retrieving revision 2.52
retrieving revision 2.53
diff -C2 -d -r2.52 -r2.53
*** pyport.h 19 Jul 2002 06:55:40 -0000 2.52
--- pyport.h 29 Jul 2002 13:42:04 -0000 2.53
***************
*** 406,410 ****
# ifdef Py_BUILD_CORE
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
! # define PyAPI_DATA(RTYPE) __declspec(dllexport) RTYPE
/* module init functions inside the core need no external linkage */
# define PyMODINIT_FUNC void
--- 406,410 ----
# ifdef Py_BUILD_CORE
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
! # define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE
/* module init functions inside the core need no external linkage */
# define PyMODINIT_FUNC void
***************
*** 413,417 ****
/* public Python functions and data are imported */
# define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
! # define PyAPI_DATA(RTYPE) __declspec(dllimport) RTYPE
/* module init functions outside the core must be exported */
# if defined(__cplusplus)
--- 413,417 ----
/* public Python functions and data are imported */
# define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
! # define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE
/* module init functions outside the core must be exported */
# if defined(__cplusplus)
***************
*** 429,433 ****
#endif
#ifndef PyAPI_DATA
! # define PyAPI_DATA(RTYPE) RTYPE
#endif
#ifndef PyMODINIT_FUNC
--- 429,433 ----
#endif
#ifndef PyAPI_DATA
! # define PyAPI_DATA(RTYPE) extern RTYPE
#endif
#ifndef PyMODINIT_FUNC
Index: pythonrun.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v
retrieving revision 2.50
retrieving revision 2.51
diff -C2 -d -r2.50 -r2.51
*** pythonrun.h 9 Jul 2002 09:23:26 -0000 2.50
--- pythonrun.h 29 Jul 2002 13:42:06 -0000 2.51
***************
*** 80,94 ****
/* In getpath.c */
! DL_IMPORT(char *) Py_GetProgramFullPath(void);
! DL_IMPORT(char *) Py_GetPrefix(void);
! DL_IMPORT(char *) Py_GetExecPrefix(void);
! DL_IMPORT(char *) Py_GetPath(void);
/* In their own files */
! DL_IMPORT(const char *) Py_GetVersion(void);
! DL_IMPORT(const char *) Py_GetPlatform(void);
! DL_IMPORT(const char *) Py_GetCopyright(void);
! DL_IMPORT(const char *) Py_GetCompiler(void);
! DL_IMPORT(const char *) Py_GetBuildInfo(void);
/* Internal -- various one-time initializations */
--- 80,94 ----
/* In getpath.c */
! PyAPI_FUNC(char *) Py_GetProgramFullPath(void);
! PyAPI_FUNC(char *) Py_GetPrefix(void);
! PyAPI_FUNC(char *) Py_GetExecPrefix(void);
! PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
! PyAPI_FUNC(const char *) Py_GetVersion(void);
! PyAPI_FUNC(const char *) Py_GetPlatform(void);
! PyAPI_FUNC(const char *) Py_GetCopyright(void);
! PyAPI_FUNC(const char *) Py_GetCompiler(void);
! PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
/* Internal -- various one-time initializations */
***************
*** 96,112 ****
DL_IMPORT(PyObject *) _PySys_Init(void);
DL_IMPORT(void) _PyImport_Init(void);
! DL_IMPORT(void) _PyExc_Init(void);
/* Various internal finalizers */
! DL_IMPORT(void) _PyExc_Fini(void);
! DL_IMPORT(void) _PyImport_Fini(void);
! DL_IMPORT(void) PyMethod_Fini(void);
! DL_IMPORT(void) PyFrame_Fini(void);
! DL_IMPORT(void) PyCFunction_Fini(void);
! DL_IMPORT(void) PyTuple_Fini(void);
! DL_IMPORT(void) PyString_Fini(void);
! DL_IMPORT(void) PyInt_Fini(void);
! DL_IMPORT(void) PyFloat_Fini(void);
! DL_IMPORT(void) PyOS_FiniInterrupts(void);
/* Stuff with no proper home (yet) */
--- 96,112 ----
DL_IMPORT(PyObject *) _PySys_Init(void);
DL_IMPORT(void) _PyImport_Init(void);
! PyAPI_FUNC(void) _PyExc_Init(void);
/* Various internal finalizers */
! PyAPI_FUNC(void) _PyExc_Fini(void);
! PyAPI_FUNC(void) _PyImport_Fini(void);
! PyAPI_FUNC(void) PyMethod_Fini(void);
! PyAPI_FUNC(void) PyFrame_Fini(void);
! PyAPI_FUNC(void) PyCFunction_Fini(void);
! PyAPI_FUNC(void) PyTuple_Fini(void);
! PyAPI_FUNC(void) PyString_Fini(void);
! PyAPI_FUNC(void) PyInt_Fini(void);
! PyAPI_FUNC(void) PyFloat_Fini(void);
! PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
/* Stuff with no proper home (yet) */