[Python-checkins] r45411 - python/trunk/Include/object.h (original) (raw)

tim.peters python-checkins at python.org
Sat Apr 15 04:14:05 CEST 2006


Author: tim.peters Date: Sat Apr 15 04:14:03 2006 New Revision: 45411

Modified: python/trunk/Include/object.h Log: There were no comments explaining what Py_CLEAR() did or why it's important. Now there are ;-)

If someone else hasn't already, I'll add a Py_CLEAR cleanup task to the TODO Wiki next.

Modified: python/trunk/Include/object.h

--- python/trunk/Include/object.h (original) +++ python/trunk/Include/object.h Sat Apr 15 04:14:03 2006 @@ -645,6 +645,40 @@ else
_Py_Dealloc((PyObject *)(op))

+/* Safely decref op and set op to NULL, especially useful in tp_clear

#define Py_CLEAR(op)
do {
if (op) { \



More information about the Python-checkins mailing list