Bug fix for expression in 2.5/2.6

This commit is contained in:
root 2013-02-20 19:23:11 +01:00
parent 0d3fa565ea
commit b835655213
4 changed files with 17 additions and 1 deletions

View File

@ -3,3 +3,8 @@ def _lsbStrToInt(str):
(ord(str[1]) << 8) + \
(ord(str[2]) << 16) + \
(ord(str[3]) << 24)
def test(x):
return x
test(a == b == c == 1)

View File

@ -50,4 +50,9 @@ def func_with_tuple_args6((a,b), (c,d)=(2,3), *args, **kwargs):
print c
def func_ret1():
return 1 < 2 < 3
return 1 < 2 < 3
def read(size=0):
if size > 0 and size <= x - cur:
return 0
return 0

View File

@ -777,6 +777,9 @@ class Scanner25(scan.Scanner):
last_jump_good = False
self.fixed_jumps[pos] = fix or match[-1]
return
elif pos < rtarget and code[target] == ROT_TWO:
self.fixed_jumps[pos] = target
return
else:
self.fixed_jumps[pos] = match[-1]
return

View File

@ -776,6 +776,9 @@ class Scanner26(scan.Scanner):
last_jump_good = False
self.fixed_jumps[pos] = fix or match[-1]
return
elif pos < rtarget and code[target] == ROT_TWO:
self.fixed_jumps[pos] = target
return
else:
self.fixed_jumps[pos] = match[-1]
return