[pypy-commit] pypy virtual-arguments: this is always positive
fijal
noreply at buildbot.pypy.org
Wed Jul 18 17:33:05 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56176:331a52aa6f9e
Date: 2012-07-18 17:32 +0200
http://bitbucket.org/pypy/pypy/changeset/331a52aa6f9e/
Log: this is always positive
diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -59,7 +59,9 @@
assert isinstance(code, pycode.PyCode)
self.pycode = code
eval.Frame.__init__(self, space, w_globals)
- self.locals_stack_w = [None] * (code.co_nlocals + code.co_stacksize)
+ size = (code.co_nlocals + code.co_stacksize)
+ assert size >= 0
+ self.locals_stack_w = [None] * size
self.valuestackdepth = code.co_nlocals
self.lastblock = None
make_sure_not_resized(self.locals_stack_w)
More information about the pypy-commit
mailing list