summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2000-09-10 01:02:41 (GMT)
committerTim Peters <tim.peters@gmail.com>2000-09-10 01:02:41 (GMT)
commit4826a894c5afa6f8b61d2b94c5a8b07588cb692a (patch)
tree835d6e66d31c11f06dcb92362c4ce72cea344fe0 /Include/object.h
parentecaf0d8b471113bbbf14b7eedb470b2f1d1d1b1f (diff)
downloadcpython-4826a894c5afa6f8b61d2b94c5a8b07588cb692a.zip
cpython-4826a894c5afa6f8b61d2b94c5a8b07588cb692a.tar.gz
cpython-4826a894c5afa6f8b61d2b94c5a8b07588cb692a.tar.bz2
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.
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h7
1 files changed, 0 insertions, 7 deletions
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').