Add support for weak references to code objects. This will be used by an optimization in the incoming Python 3 JIT.

Patch by Reid Kleckner!
This commit is contained in:
Collin Winter 2010-03-18 21:54:01 +00:00
parent 2e0a53fdf6
commit 001a3952c9
6 changed files with 40 additions and 7 deletions

View file

@ -552,7 +552,7 @@ class SizeofTest(unittest.TestCase):
# complex
check(complex(0,1), size(h + '2d'))
# code
check(get_cell().func_code, size(h + '4i8Pi2P'))
check(get_cell().func_code, size(h + '4i8Pi3P'))
# BaseException
check(BaseException(), size(h + '3P'))
# UnicodeEncodeError