You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Correct PYPY bit logic in previous commit
This commit is contained in:
@@ -30,7 +30,7 @@ from fnmatch import fnmatch
|
||||
TEST_VERSIONS=('2.3.7', '2.4.6', '2.5.6', '2.6.9',
|
||||
'pypy-2.4.0', 'pypy-2.6.1',
|
||||
'pypy-5.0.1', 'pypy-5.3.1',
|
||||
'2.7.10', '2.7.11',
|
||||
'2.7.10', '2.7.11', '2.7.12',
|
||||
'3.2.6', '3.3.5', '3.4.2', '3.5.1')
|
||||
|
||||
target_base = '/tmp/py-dis/'
|
||||
|
@@ -337,9 +337,11 @@ def cmp_code_objects(version, is_pypy, code_obj1, code_obj2, name=''):
|
||||
for c1, c2 in zip(codes1, codes2):
|
||||
cmp_code_objects(version, is_pypy, c1, c2, name=name)
|
||||
elif member == 'co_flags':
|
||||
# For PYPY for now we don't care about PYPY_SOURCE_IS_UTF8:
|
||||
flags1 = code_obj1.co_flags | 0x0100 # PYPY_SOURCE_IS_UTF8
|
||||
flags1 = code_obj1.co_flags
|
||||
flags2 = code_obj2.co_flags
|
||||
if is_pypy:
|
||||
# For PYPY for now we don't care about PYPY_SOURCE_IS_UTF8:
|
||||
flags2 &= ~0x0100 # PYPY_SOURCE_IS_UTF8
|
||||
if flags1 != flags2:
|
||||
raise CmpErrorMember(name, 'co_flags',
|
||||
pretty_flags(flags1),
|
||||
|
Reference in New Issue
Block a user