[Python-checkins] CVS: python/dist/src/Objects funcobject.c,2.35,2.36
Jeremy Hylton
jhylton@users.sourceforge.net
2001年2月28日 22:06:39 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv26139/Objects
Modified Files:
funcobject.c
Log Message:
Visit the closure during traversal and XDECREF it on during deallocation.
Index: funcobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v
retrieving revision 2.35
retrieving revision 2.36
diff -C2 -r2.35 -r2.36
*** funcobject.c 2001年02月28日 02:42:56 2.35
--- funcobject.c 2001年03月01日 06:06:37 2.36
***************
*** 253,256 ****
--- 253,257 ----
Py_XDECREF(op->func_doc);
Py_XDECREF(op->func_dict);
+ Py_XDECREF(op->func_closure);
op = (PyFunctionObject *) PyObject_AS_GC(op);
PyObject_DEL(op);
***************
*** 301,304 ****
--- 302,310 ----
if (f->func_dict) {
err = visit(f->func_dict, arg);
+ if (err)
+ return err;
+ }
+ if (f->func_closure) {
+ err = visit(f->func_closure, arg);
if (err)
return err;