Re: [PATCH 2/5] gdb/python: move PyLong_From* calls into py-utils.c

Tom Tromey
2021-06-07T14:54:21Z

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> gdb/ChangeLog:

Andrew> * python/py-inferior.c (infpy_get_connection_num): Call new
Andrew> function gdb_py_object_from_int.
Andrew> * python/py-utils.c (gdb_py_object_from_int): New function.
Andrew> * python/python-internal.h (gdb_py_object_from_int): Declare.

This seems fine to me.

It would also probably be ok to just rely on promotion and always use
gdb_py_object_from_longest.

Tom