[Python-checkins] CVS: python/dist/src/Include pymem.h,2.7,2.8

Tim Peters tim_one@users.sourceforge.net
Tue, 19 Mar 2002 20:02:33 -0800


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv4503

Modified Files:
	pymem.h 
Log Message:
Arrange to export the _PyMalloc_{Malloc, Realloc, Free} entry points.  On
Windows some modules are considered (by me, and I don't care what anyone
else thinks about this <wink>) to be part of "the core" despite that they
happen to be compiled into separate DLLs (the "to DLL or not to DLL?"
question on Windows is nearly arbitrary).  Making the pymalloc entry
points available to them allows the Windows build to complete without
incident when WITH_PYMALLOC is #define'd.

Note that this isn't unprecedented.  Other "private API" functions we
export include _PySequence_IterSearch, _PyEval_SliceIndex, _PyCodec_Lookup,
_Py_ZeroStruct, _Py_TrueStruct, _PyLong_New and _PyModule_Clear.


Index: pymem.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pymem.h,v
retrieving revision 2.7
retrieving revision 2.8
diff -C2 -d -r2.7 -r2.8
*** pymem.h	18 Mar 2002 21:04:54 -0000	2.7
--- pymem.h	20 Mar 2002 04:02:31 -0000	2.8
***************
*** 93,99 ****
  /* pymalloc (private to the interpreter) */
  #ifdef WITH_PYMALLOC
! void *_PyMalloc_Malloc(size_t nbytes);
! void *_PyMalloc_Realloc(void *p, size_t nbytes);
! void _PyMalloc_Free(void *p);
  #define _PyMalloc_MALLOC _PyMalloc_Malloc
  #define _PyMalloc_REALLOC _PyMalloc_Realloc
--- 93,99 ----
  /* pymalloc (private to the interpreter) */
  #ifdef WITH_PYMALLOC
! DL_IMPORT(void *) _PyMalloc_Malloc(size_t nbytes);
! DL_IMPORT(void *) _PyMalloc_Realloc(void *p, size_t nbytes);
! DL_IMPORT(void) _PyMalloc_Free(void *p);
  #define _PyMalloc_MALLOC _PyMalloc_Malloc
  #define _PyMalloc_REALLOC _PyMalloc_Realloc