[Python-checkins] r45436 - python/trunk/Modules/_csv.c

thomas.wouters python-checkins at python.org
Sat Apr 15 19:33:15 CEST 2006


Author: thomas.wouters
Date: Sat Apr 15 19:33:14 2006
New Revision: 45436

Modified:
   python/trunk/Modules/_csv.c
Log:

Re-instate backward compatibility by defining Py_CLEAR if it isn't
available.



Modified: python/trunk/Modules/_csv.c
==============================================================================
--- python/trunk/Modules/_csv.c	(original)
+++ python/trunk/Modules/_csv.c	Sat Apr 15 19:33:14 2006
@@ -37,6 +37,20 @@
 #		define PyMODINIT_FUNC void
 #	endif /* __cplusplus */
 #endif
+
+#ifndef Py_CLEAR
+#define Py_CLEAR(op)						\
+	do {							\
+		if (op) {					\
+			PyObject *tmp = (PyObject *)(op);	\
+			(op) = NULL;				\
+			Py_DECREF(tmp);				\
+		}						\
+	} while (0)
+#endif
+#ifndef Py_VISIT
+
+
 /* end 2.2 compatibility macros */
 
 #define IS_BASESTRING(o) \


More information about the Python-checkins mailing list