tools/mpy-tool.py: Adjust use of super() to make it work with Python 2.
Fixes the regression introduced in ea3c80a514
This commit is contained in:
parent
fd523c53c3
commit
643d2a0e86
|
@ -259,7 +259,7 @@ def extract_prelude(bytecode, ip):
|
||||||
class MPFunTable:
|
class MPFunTable:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class RawCode:
|
class RawCode(object):
|
||||||
# a set of all escaped names, to make sure they are unique
|
# a set of all escaped names, to make sure they are unique
|
||||||
escaped_names = set()
|
escaped_names = set()
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ class RawCode:
|
||||||
|
|
||||||
class RawCodeBytecode(RawCode):
|
class RawCodeBytecode(RawCode):
|
||||||
def __init__(self, bytecode, qstrs, objs, raw_codes):
|
def __init__(self, bytecode, qstrs, objs, raw_codes):
|
||||||
super().__init__(MP_CODE_BYTECODE, bytecode, 0, qstrs, objs, raw_codes)
|
super(RawCodeBytecode, self).__init__(MP_CODE_BYTECODE, bytecode, 0, qstrs, objs, raw_codes)
|
||||||
|
|
||||||
def freeze(self, parent_name):
|
def freeze(self, parent_name):
|
||||||
self.freeze_children(parent_name)
|
self.freeze_children(parent_name)
|
||||||
|
@ -462,7 +462,7 @@ class RawCodeBytecode(RawCode):
|
||||||
|
|
||||||
class RawCodeNative(RawCode):
|
class RawCodeNative(RawCode):
|
||||||
def __init__(self, code_kind, fun_data, prelude_offset, prelude, qstr_links, qstrs, objs, raw_codes, type_sig):
|
def __init__(self, code_kind, fun_data, prelude_offset, prelude, qstr_links, qstrs, objs, raw_codes, type_sig):
|
||||||
super().__init__(code_kind, fun_data, prelude_offset, qstrs, objs, raw_codes)
|
super(RawCodeNative, self).__init__(code_kind, fun_data, prelude_offset, qstrs, objs, raw_codes)
|
||||||
self.prelude = prelude
|
self.prelude = prelude
|
||||||
self.qstr_links = qstr_links
|
self.qstr_links = qstr_links
|
||||||
self.type_sig = type_sig
|
self.type_sig = type_sig
|
||||||
|
|
Loading…
Reference in New Issue