diff Include/Python.h @ 14497:d327fc47f8fd legacy-trunk

Close SF bug 110826: a complaint about the way Python #define'd NULL. It's hard to sort out what the bug was, exactly. So, Big Hammer: 1. Python shouldn't be in the business of #define'ing NULL, period. 2. Users of the Python C API shouldn't be in the business of not including Python.h, period. Hence: 1. Removed all #define's of NULL in Python source code (pyport.h and object.h). 2. Since we're *relying* on stdio.h defining NULL, put an #error in Python.h after its #include of stdio.h if NULL isn't defined then.
author Tim Peters <tim.peters@gmail.com>
date Sun, 10 Sep 2000 01:02:41 +0000
parents 6f6f965c5e2d
children 756c8c6535fe
line wrap: on
line diff
--- a/Include/Python.h	Sat Sep 09 21:15:12 2000 +0000
+++ b/Include/Python.h	Sun Sep 10 01:02:41 2000 +0000
@@ -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