[Python-checkins] CVS: python/dist/src/Include ceval.h,2.35,2.36 mymalloc.h,2.23,2.24 objimpl.h,2.22,2.23
Thomas Wouters
python-dev@python.org
Tue, 25 Jul 2000 05:56:40 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Include
Modified Files:
ceval.h mymalloc.h objimpl.h
Log Message:
Use 'void' directly instead of the ANY #define, now that all code is ANSI C.
Leave the actual #define in for API compatibility.
Index: ceval.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v
retrieving revision 2.35
retrieving revision 2.36
diff -C2 -r2.35 -r2.36
*** ceval.h 2000/07/22 23:30:03 2.35
--- ceval.h 2000/07/25 12:56:37 2.36
***************
*** 41,45 ****
DL_IMPORT(int) Py_FlushLine(void);
! DL_IMPORT(int) Py_AddPendingCall(int (*func)(ANY *), ANY *arg);
DL_IMPORT(int) Py_MakePendingCalls(void);
--- 41,45 ----
DL_IMPORT(int) Py_FlushLine(void);
! DL_IMPORT(int) Py_AddPendingCall(int (*func)(void *), void *arg);
DL_IMPORT(int) Py_MakePendingCalls(void);
Index: mymalloc.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/mymalloc.h,v
retrieving revision 2.23
retrieving revision 2.24
diff -C2 -r2.23 -r2.24
*** mymalloc.h 2000/07/12 17:21:41 2.23
--- mymalloc.h 2000/07/25 12:56:37 2.24
***************
*** 13,35 ****
/* Lowest-level memory allocation interface */
! #ifdef macintosh
! #define ANY void
! #endif
!
! #ifdef __STDC__
! #define ANY void
! #endif
!
! #ifdef __TURBOC__
! #define ANY void
! #endif
!
! #ifdef __GNUC__
! #define ANY void
! #endif
!
! #ifndef ANY
! #define ANY char
! #endif
#ifdef HAVE_STDLIB_H
--- 13,17 ----
/* Lowest-level memory allocation interface */
! #define ANY void /* For API compatibility only. Obsolete, do not use. */
#ifdef HAVE_STDLIB_H
***************
*** 50,54 ****
#ifndef NULL
! #define NULL ((ANY *)0)
#endif
--- 32,36 ----
#ifndef NULL
! #define NULL ((void *)0)
#endif
***************
*** 88,98 ****
#undef PyCore_FREE_PROTO
#define PyCore_MALLOC_PROTO (size_t)
! #define PyCore_REALLOC_PROTO (ANY *, size_t)
! #define PyCore_FREE_PROTO (ANY *)
#endif
#ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND
! extern ANY *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO;
! extern ANY *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO;
extern void PyCore_FREE_FUNC PyCore_FREE_PROTO;
#endif
--- 70,80 ----
#undef PyCore_FREE_PROTO
#define PyCore_MALLOC_PROTO (size_t)
! #define PyCore_REALLOC_PROTO (void *, size_t)
! #define PyCore_FREE_PROTO (void *)
#endif
#ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND
! extern void *PyCore_MALLOC_FUNC PyCore_MALLOC_PROTO;
! extern void *PyCore_REALLOC_FUNC PyCore_REALLOC_PROTO;
extern void PyCore_FREE_FUNC PyCore_FREE_PROTO;
#endif
***************
*** 135,141 ****
doesn't. Returned pointers must be checked for NULL explicitly.
No action is performed on failure. */
! extern DL_IMPORT(ANY *) PyMem_Malloc(size_t);
! extern DL_IMPORT(ANY *) PyMem_Realloc(ANY *, size_t);
! extern DL_IMPORT(void) PyMem_Free(ANY *);
/* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are
--- 117,123 ----
doesn't. Returned pointers must be checked for NULL explicitly.
No action is performed on failure. */
! extern DL_IMPORT(void *) PyMem_Malloc(size_t);
! extern DL_IMPORT(void *) PyMem_Realloc(void *, size_t);
! extern DL_IMPORT(void) PyMem_Free(void *);
/* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are
***************
*** 144,149 ****
/* Macros */
#define PyMem_MALLOC(n) PyCore_MALLOC(n)
! #define PyMem_REALLOC(p, n) PyCore_REALLOC((ANY *)(p), (n))
! #define PyMem_FREE(p) PyCore_FREE((ANY *)(p))
/*
--- 126,131 ----
/* Macros */
#define PyMem_MALLOC(n) PyCore_MALLOC(n)
! #define PyMem_REALLOC(p, n) PyCore_REALLOC((void *)(p), (n))
! #define PyMem_FREE(p) PyCore_FREE((void *)(p))
/*
Index: objimpl.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v
retrieving revision 2.22
retrieving revision 2.23
diff -C2 -r2.22 -r2.23
*** objimpl.h 2000/07/10 04:30:56 2.22
--- objimpl.h 2000/07/25 12:56:37 2.23
***************
*** 102,107 ****
#ifdef NEED_TO_DECLARE_OBJECT_MALLOC_AND_FRIEND
! extern ANY *PyCore_OBJECT_MALLOC_FUNC PyCore_OBJECT_MALLOC_PROTO;
! extern ANY *PyCore_OBJECT_REALLOC_FUNC PyCore_OBJECT_REALLOC_PROTO;
extern void PyCore_OBJECT_FREE_FUNC PyCore_OBJECT_FREE_PROTO;
#endif
--- 102,107 ----
#ifdef NEED_TO_DECLARE_OBJECT_MALLOC_AND_FRIEND
! extern void *PyCore_OBJECT_MALLOC_FUNC PyCore_OBJECT_MALLOC_PROTO;
! extern void *PyCore_OBJECT_REALLOC_FUNC PyCore_OBJECT_REALLOC_PROTO;
extern void PyCore_OBJECT_FREE_FUNC PyCore_OBJECT_FREE_PROTO;
#endif
***************
*** 138,149 ****
bytes returns a non-NULL pointer. Returned pointers must be checked
for NULL explicitly; no action is performed on failure. */
! extern DL_IMPORT(ANY *) PyObject_Malloc(size_t);
! extern DL_IMPORT(ANY *) PyObject_Realloc(ANY *, size_t);
! extern DL_IMPORT(void) PyObject_Free(ANY *);
/* Macros */
#define PyObject_MALLOC(n) PyCore_OBJECT_MALLOC(n)
! #define PyObject_REALLOC(op, n) PyCore_OBJECT_REALLOC((ANY *)(op), (n))
! #define PyObject_FREE(op) PyCore_OBJECT_FREE((ANY *)(op))
/*
--- 138,149 ----
bytes returns a non-NULL pointer. Returned pointers must be checked
for NULL explicitly; no action is performed on failure. */
! extern DL_IMPORT(void *) PyObject_Malloc(size_t);
! extern DL_IMPORT(void *) PyObject_Realloc(void *, size_t);
! extern DL_IMPORT(void) PyObject_Free(void *);
/* Macros */
#define PyObject_MALLOC(n) PyCore_OBJECT_MALLOC(n)
! #define PyObject_REALLOC(op, n) PyCore_OBJECT_REALLOC((void *)(op), (n))
! #define PyObject_FREE(op) PyCore_OBJECT_FREE((void *)(op))
/*