Don't use PyLong_FromUnsignedLong

This changes gdb to avoid PyLong_FromUnsignedLong, preferring
gdb_py_object_from_ulongest instead.

gdb/ChangeLog
2020-09-15  Tom Tromey  <tromey@adacore.com>

	* python/python.c (gdbpy_parameter_value): Use
	gdb_py_object_from_ulongest.
This commit is contained in:
Tom Tromey 2020-09-15 11:08:56 -06:00
parent 4ab1029c56
commit 512116ce26
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2020-09-15 Tom Tromey <tromey@adacore.com>
* python/python.c (gdbpy_parameter_value): Use
gdb_py_object_from_ulongest.
2020-09-15 Tom Tromey <tromey@adacore.com>
* python/py-infevents.c (create_register_changed_event_object):

View File

@ -504,13 +504,13 @@ gdbpy_parameter_value (enum var_types type, void *var)
if (val == UINT_MAX)
Py_RETURN_NONE;
return PyLong_FromUnsignedLong (val);
return gdb_py_object_from_ulongest (val).release ();
}
case var_zuinteger:
{
unsigned int val = * (unsigned int *) var;
return PyLong_FromUnsignedLong (val);
return gdb_py_object_from_ulongest (val).release ();
}
}