summaryrefslogtreecommitdiffstats
path: root/Include/mymalloc.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-10 17:43:33 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-10 17:43:33 (GMT)
commit6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be (patch)
tree272cf71937fdd8612162ce179786467c44ec3c70 /Include/mymalloc.h
parent062cfb0c4e804a6c0d5d9d1711abdcfb1882e200 (diff)
downloadcpython-6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be.zip
cpython-6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be.tar.gz
cpython-6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be.tar.bz2
changes for C++ (Tim MacKenzie)
Diffstat (limited to 'Include/mymalloc.h')
-rw-r--r--Include/mymalloc.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/Include/mymalloc.h b/Include/mymalloc.h
index 877bcb9..3c80db1 100644
--- a/Include/mymalloc.h
+++ b/Include/mymalloc.h
@@ -1,9 +1,5 @@
#ifndef Py_MYMALLOC_H
#define Py_MYMALLOC_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
The Netherlands.
@@ -52,7 +48,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#else /* !HAVE_STDLIB */
+#endif
+
+#ifdef __cplusplus
+// Move this down here since some C++ #include's don't like to be included
+// inside an extern "C"
+extern "C" {
+#endif
+
+#ifndef HAVE_STDLIB_H
extern ANY *malloc PROTO((size_t));
extern ANY *calloc PROTO((size_t, size_t));
extern ANY *realloc PROTO((ANY *, size_t));