summaryrefslogtreecommitdiffstats
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
authorRichard Jones <richard@commonground.com.au>2006-05-23 10:37:38 (GMT)
committerRichard Jones <richard@commonground.com.au>2006-05-23 10:37:38 (GMT)
commit7c88dcc5aba28570ef7c1a957baaceb6e47cfc41 (patch)
tree221340a23aa7fb642a5d30076527254d221025b0 /Objects/codeobject.c
parent833bf9422ea436774396f435e04fc3b927a16b88 (diff)
downloadcpython-7c88dcc5aba28570ef7c1a957baaceb6e47cfc41.zip
cpython-7c88dcc5aba28570ef7c1a957baaceb6e47cfc41.tar.gz
cpython-7c88dcc5aba28570ef7c1a957baaceb6e47cfc41.tar.bz2
Merge from rjones-funccall branch.
Applied patch zombie-frames-2.diff from sf patch 876206 with updates for Python 2.5 and also modified to retain the free_list to avoid the 67% slow-down in pybench recursion test. 5% speed up in function call pybench.
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 8ae2399..a9bcb01 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -102,6 +102,7 @@ PyCode_New(int argcount, int nlocals, int stacksize, int flags,
co->co_firstlineno = firstlineno;
Py_INCREF(lnotab);
co->co_lnotab = lnotab;
+ co->co_zombieframe = NULL;
}
return co;
}
@@ -265,6 +266,8 @@ code_dealloc(PyCodeObject *co)
Py_XDECREF(co->co_filename);
Py_XDECREF(co->co_name);
Py_XDECREF(co->co_lnotab);
+ if (co->co_zombieframe != NULL)
+ PyObject_GC_Del(co->co_zombieframe);
PyObject_DEL(co);
}