[Python-checkins] r45413 - in python/trunk: Include/objimpl.h Objects/frameobject.c (original) (raw)

tim.peters python-checkins at python.org
Sat Apr 15 05:22:47 CEST 2006


Author: tim.peters Date: Sat Apr 15 05:22:46 2006 New Revision: 45413

Modified: python/trunk/Include/objimpl.h python/trunk/Objects/frameobject.c Log: frame_traverse(): Use the standard Py_VISIT macro.

Py_VISIT: cast the op argument to PyObject* when calling visit(). Else the caller has to pay too much attention to this silly detail (e.g., frame_traverse needs to traverse struct _frame * and PyCodeObject * pointers too).

Modified: python/trunk/Include/objimpl.h

--- python/trunk/Include/objimpl.h (original) +++ python/trunk/Include/objimpl.h Sat Apr 15 05:22:46 2006 @@ -303,13 +303,13 @@

+#define Py_VISIT(op) \

/* This is here for the sake of backwards compatibility. Extensions that

Modified: python/trunk/Objects/frameobject.c

--- python/trunk/Objects/frameobject.c (original) +++ python/trunk/Objects/frameobject.c Sat Apr 15 05:22:46 2006 @@ -422,30 +422,28 @@ frame_traverse(PyFrameObject *f, visitproc visit, void *arg) { PyObject **fastlocals, **p; - int i, err, slots; -#define VISIT(o) if (o) {if ((err = visit((PyObject *)(o), arg))) return err;} + int i, slots;



More information about the Python-checkins mailing list