summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/Python.h4
-rw-r--r--Include/object.h7
-rw-r--r--Include/pyport.h4
3 files changed, 4 insertions, 11 deletions
diff --git a/Include/Python.h b/Include/Python.h
index fd7ddb6..46bfda2 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -36,6 +36,10 @@
#endif
#include <stdio.h>
+#ifndef NULL
+# error "Python.h requires that stdio.h define NULL."
+#endif
+
#include <string.h>
#include <errno.h>
#ifdef HAVE_STDLIB_H
diff --git a/Include/object.h b/Include/object.h
index ab7a2c7..fa25d59 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -423,13 +423,6 @@ extern DL_IMPORT(long) _Py_RefTotal;
#define Py_XINCREF(op) if ((op) == NULL) ; else Py_INCREF(op)
#define Py_XDECREF(op) if ((op) == NULL) ; else Py_DECREF(op)
-/* Definition of NULL, so you don't have to include <stdio.h> */
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-
/*
_Py_NoneStruct is an object of undefined type which can be used in contexts
where NULL (nil) is not suitable (since NULL often means 'error').
diff --git a/Include/pyport.h b/Include/pyport.h
index b43b868..48cd45b 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -313,10 +313,6 @@ extern double hypot(double, double);
#define DL_IMPORT(RTYPE) RTYPE
#endif
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-
#ifdef MALLOC_ZERO_RETURNS_NULL
/* XXX Always allocate one extra byte, since some malloc's return NULL
XXX for malloc(0) or realloc(p, 0). */