You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
2.5/2.6 RETURN_VALUE bug
This commit is contained in:
@@ -720,7 +720,8 @@ class Scanner2(scan.Scanner):
|
||||
self.structs.append({'type': 'if-then',
|
||||
'start': start,
|
||||
'end': rtarget})
|
||||
self.return_end_ifs.add(pre_rtarget)
|
||||
if self.version == 2.7 or code[pre_rtarget+1] != self.opc.JUMP_FORWARD:
|
||||
self.return_end_ifs.add(pre_rtarget)
|
||||
|
||||
elif op in self.pop_jump_if_or_pop:
|
||||
target = self.get_target(pos, op)
|
||||
|
@@ -219,9 +219,6 @@ class Scanner26(scan.Scanner2):
|
||||
pattr = repr(offset + 3 + oparg)
|
||||
if op == self.opc.JUMP_FORWARD:
|
||||
target = self.get_target(offset)
|
||||
if target > offset and self.code[target] == self.opc.RETURN_VALUE:
|
||||
# Python 2.5 sometimes has this
|
||||
op_name = 'JUMP_RETURN'
|
||||
# FIXME: this is a hack to catch stuff like:
|
||||
# if x: continue
|
||||
# the "continue" is not on a new line.
|
||||
|
Reference in New Issue
Block a user