Kaydet (Commit) 2742c5ed authored tarafından Thomas Wouters's avatar Thomas Wouters

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

available.
üst edf17d87
......@@ -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) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment