mirror of
https://github.com/python/cpython
synced 2024-09-16 01:31:10 +00:00
closes bpo-16637: libpython: construct integer object directly from gdbvalue (GH-15232)
This fixes the exception '`ValueError: invalid literal for int() with base 10` if `str(gdbval)` returns a hexadecimal value (e.g. '0xa0'). This is the case if the output-radix is set to 16 in gdb. See https://sourceware.org/gdb/onlinedocs/gdb/Numbers.html for more information.
This commit is contained in:
parent
4346bad332
commit
6f53d34fb0
|
@ -1392,7 +1392,7 @@ def write_repr(self, out, visited):
|
|||
|
||||
|
||||
def int_from_int(gdbval):
|
||||
return int(str(gdbval))
|
||||
return int(gdbval)
|
||||
|
||||
|
||||
def stringify(val):
|
||||
|
|
Loading…
Reference in a new issue