Work around lack of JUMP_OPs in xdis 1.1.0

This commit is contained in:
rocky
2016-05-31 20:03:28 -04:00
parent 20768266b4
commit 70c6ee946c
2 changed files with 5 additions and 4 deletions

View File

@@ -8,10 +8,11 @@ scanner routine for Python 3.
from __future__ import print_function
# import xdis
from xdis.opcodes import opcode_34 as opc
# bytecode verification, verify(), uses JUMP_OPs from here
# JUMP_OPs = xdis.opcodes.opcode_34.JUMP_OPs
JUMP_OPs = map(lambda op: opc.opname[op], opc.hasjrel + opc.hasjabs)
from uncompyle6.scanners.scanner3 import Scanner3
class Scanner34(Scanner3):

View File

@@ -8,12 +8,12 @@ scanner routine for Python 3.
from __future__ import print_function
# import xdis
from xdis.opcodes import opcode_35 as opc
from uncompyle6.scanners.scanner3 import Scanner3
# bytecode verification, verify(), uses JUMP_OPs from here
# JUMP_OPs = xdis.opcodes.opcode_35.JUMP_OPs
JUMP_OPs = map(lambda op: opc.opname[op], opc.hasjrel + opc.hasjabs)
class Scanner35(Scanner3):