Also add _repr_ for UcReg
This commit is contained in:
parent
13f17e5b3f
commit
4c4d582fcb
@ -15,6 +15,9 @@ uc_hook_h = ctypes.c_size_t
|
||||
|
||||
VT = TypeVar('VT', bound=Tuple[int, ...])
|
||||
|
||||
def _structure_repr(self):
|
||||
return "%s(%s)" % (self.__class__.__name__, ", ".join("%s=%s" % (k, getattr(self, k)) for (k, _) in self._fields_))
|
||||
|
||||
|
||||
class UcReg(ctypes.Structure):
|
||||
"""A base class for composite registers.
|
||||
@ -38,6 +41,7 @@ class UcReg(ctypes.Structure):
|
||||
|
||||
pass
|
||||
|
||||
_repr_ = _structure_repr
|
||||
|
||||
class UcTupledReg(UcReg, Generic[VT]):
|
||||
"""A base class for registers whose values are represented as a set
|
||||
|
Loading…
Reference in New Issue
Block a user