[pypy-svn] r17353 - pypy/dist/pypy/interpreter/astcompiler
adim at codespeak.net
adim at codespeak.net
Thu Sep 8 11:28:05 CEST 2005
Author: adim
Date: Thu Sep 8 11:28:04 2005
New Revision: 17353
Modified:
pypy/dist/pypy/interpreter/astcompiler/misc.py
pypy/dist/pypy/interpreter/astcompiler/pycodegen.py
Log:
get rid of annotation warning when using stack.__getitem__ (we could also probably simply remove the Stack class)
Modified: pypy/dist/pypy/interpreter/astcompiler/misc.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/misc.py (original)
+++ pypy/dist/pypy/interpreter/astcompiler/misc.py Thu Sep 8 11:28:04 2005
@@ -46,6 +46,8 @@
return self.stack[-1]
def __getitem__(self, index): # needed by visitContinue()
return self.stack[index]
+ def elementAtIndex(self, index):
+ return self.stack[index]
MANGLE_LEN = 256 # magic constant from compile.c
Modified: pypy/dist/pypy/interpreter/astcompiler/pycodegen.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/pycodegen.py (original)
+++ pypy/dist/pypy/interpreter/astcompiler/pycodegen.py Thu Sep 8 11:28:04 2005
@@ -481,7 +481,7 @@
loop_block = None
while top > 0:
top = top - 1
- kind, loop_block = self.setups[top]
+ kind, loop_block = self.setups.elementAtIndex(top)
if kind == LOOP:
break
if kind != LOOP:
More information about the Pypy-commit
mailing list