Skip to content

Commit

Permalink
Improve namedtuple definition (#2506)
Browse files Browse the repository at this point in the history
While working on python/mypy#11206 I found that `Regspec` definition is not ideal.
It is recommended to use the same string name, as variable name. 
For example, it affects how `pickle` works.

Related #2501
Related 6e036f3
  • Loading branch information
sobolevn committed Dec 5, 2021
1 parent da67723 commit 285ab50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manticore/native/cpu/x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def new_method(cpu, *args, **kw_args):


class AMD64RegFile(RegisterFile):
Regspec = collections.namedtuple("RegSpec", "register_id ty offset size reset")
Regspec = collections.namedtuple("Regspec", "register_id ty offset size reset")
_flags = {"CF": 0, "PF": 2, "AF": 4, "ZF": 6, "SF": 7, "IF": 9, "DF": 10, "OF": 11}
_table = {
"CS": Regspec("CS", int, 0, 16, False),
Expand Down

0 comments on commit 285ab50

Please sign in to comment.