LOAD_CONST->LOAD_STR for Python 3.x

This commit is contained in:
rocky
2019-06-07 05:54:26 -04:00
parent ceebe9ab60
commit 44d7cbcf6f
8 changed files with 45 additions and 43 deletions

View File

@@ -310,6 +310,8 @@ class Scanner3(Scanner):
# pattr = 'code_object @ 0x%x %s->%s' %\
# (id(const), const.co_filename, const.co_name)
pattr = '<code_object ' + const.co_name + '>'
elif isinstance(const, str):
opname = 'LOAD_STR'
else:
if isinstance(inst.arg, int) and inst.arg < len(co.co_consts):
argval, _ = _get_const_info(inst.arg, co.co_consts)