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

available.
This commit is contained in:
Thomas Wouters 2006-04-15 17:33:14 +00:00
parent edf17d8798
commit 2742c5ed63

View file

@ -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) \