diff options
author | Thomas Wouters <thomas@python.org> | 2006-04-15 17:33:14 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-04-15 17:33:14 (GMT) |
commit | 2742c5ed633776acb0cef21801acad9214b87094 (patch) | |
tree | f6a2f697022cdad713c52755e3e6b6184c0332b2 /Modules/_csv.c | |
parent | edf17d8798e65c10c970ef86f7374f6c1b51027a (diff) | |
download | cpython-2742c5ed633776acb0cef21801acad9214b87094.zip cpython-2742c5ed633776acb0cef21801acad9214b87094.tar.gz cpython-2742c5ed633776acb0cef21801acad9214b87094.tar.bz2 |
Re-instate backward compatibility by defining Py_CLEAR if it isn't
available.
Diffstat (limited to 'Modules/_csv.c')
-rw-r--r-- | Modules/_csv.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c index 88c7248..9ce53bd 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -37,6 +37,20 @@ module instead. # 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) \ |