diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbutil.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbutil.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py index 7aeffa37671..ea34ed6271e 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbutil.py +++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py @@ -84,7 +84,7 @@ def int_to_bytearray(val, bytesize): return None packed = struct.pack(fmt, val) - return bytearray(list(map(ord, packed))) + return bytearray(packed) def bytearray_to_int(bytes, bytesize): """Utility function to convert a bytearray into an integer. @@ -108,7 +108,7 @@ def bytearray_to_int(bytes, bytesize): else: return None - unpacked = struct.unpack(fmt, str(bytes)) + unpacked = struct.unpack_from(fmt, bytes) return unpacked[0] |