Mercurial > cpython-lru_cache-weakref
diff Objects/codeobject.c @ 38244:a637c78bf119 legacy-trunk
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.
| author | Richard Jones <richard@commonground.com.au> |
|---|---|
| date | Tue, 23 May 2006 10:37:38 +0000 |
| parents | cc48985c3266 |
| children | 476cd83777f2 |
line wrap: on
line diff
--- a/Objects/codeobject.c Tue May 23 10:12:21 2006 +0000 +++ b/Objects/codeobject.c Tue May 23 10:37:38 2006 +0000 @@ -102,6 +102,7 @@ co->co_firstlineno = firstlineno; Py_INCREF(lnotab); co->co_lnotab = lnotab; + co->co_zombieframe = NULL; } return co; } @@ -265,6 +266,8 @@ 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); }
