summaryrefslogtreecommitdiffstats
path: root/Include/pgenheaders.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-22 02:33:27 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-22 02:33:27 (GMT)
commit51e7f5cabaef2ed6e36412ce933061cfc89a766d (patch)
tree06467f3dcc84826c81a6862797c9a7c14d96c26d /Include/pgenheaders.h
parenta2bc259dd71d53f643db13ac5077fafe9d5bacae (diff)
downloadcpython-51e7f5cabaef2ed6e36412ce933061cfc89a766d.zip
cpython-51e7f5cabaef2ed6e36412ce933061cfc89a766d.tar.gz
cpython-51e7f5cabaef2ed6e36412ce933061cfc89a766d.tar.bz2
Moving pymalloc along.
+ Redirect PyMem_{Del, DEL} to the object allocator's free() when pymalloc is enabled. Needed so old extensions can continue to mix PyObject_New with PyMem_DEL. + This implies that pgen needs to be able to see the PyObject_XYZ declarations too. pgenheaders.h now includes Python.h. An implication is that I expect obmalloc.o needs to get linked into pgen on non-Windows boxes. + When PYMALLOC_DEBUG is defined, *all* Py memory API functions now funnel through the debug allocator wrapper around pymalloc. This is the default in a debug build. + That caused compile.c to fail: it indirectly mixed PyMem_Malloc with raw platform free() in one place. This is verbotten.
Diffstat (limited to 'Include/pgenheaders.h')
-rw-r--r--Include/pgenheaders.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/Include/pgenheaders.h b/Include/pgenheaders.h
index 051173c..fecfcc1 100644
--- a/Include/pgenheaders.h
+++ b/Include/pgenheaders.h
@@ -7,23 +7,7 @@ extern "C" {
/* Include files and extern declarations used by most of the parser. */
-#include "pyconfig.h"
-
-/* pyconfig.h may or may not define DL_IMPORT */
-#ifndef DL_IMPORT /* declarations for DLL import/export */
-#define DL_IMPORT(RTYPE) RTYPE
-#endif
-
-#include <stdio.h>
-#include <string.h>
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#include "pymem.h"
-
-#include "pydebug.h"
+#include "Python.h"
DL_IMPORT(void) PySys_WriteStdout(const char *format, ...)
__attribute__((format(printf, 1, 2)));