aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-05-26 21:28:11 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-06-21 16:09:06 +0100
commit8b9c48b287d42d1c816f441e4273dcb8c7af1876 (patch)
tree541573fe5d8a70cfd36bfb46a59a697b558aa49c /sim
parent61e2dde2db3ef256907d9088506271f1569dd665 (diff)
downloadgdb-8b9c48b287d42d1c816f441e4273dcb8c7af1876.zip
gdb-8b9c48b287d42d1c816f441e4273dcb8c7af1876.tar.gz
gdb-8b9c48b287d42d1c816f441e4273dcb8c7af1876.tar.bz2
gdb/python: move PyLong_From* calls into py-utils.c
We already have two helper functions in py-utils.c: gdb_py_object_from_longest (LONGEST l) gdb_py_object_from_ulongest (ULONGEST l) these wrap around calls to either PyLong_FromLongLong, PyLong_FromLong, or PyInt_From_Long (if Python 2 is being used). There is one place in gdb/python/* where a call to PyLong_FromLong was added outside of the above utility functions, this was done in the recent commit: commit 55789354fcbaf879f3ca8475b647b2747dec486e Date: Fri May 14 11:56:31 2021 +0200 gdb/python: add a 'connection_num' attribute to Inferior objects In this commit I replace the direct use of PyLong_FromLong with a call to gdb_py_object_from_longest. The only real change with this commit, is that, for Python 2, we will now end up calling PyInt_FromLong instead of PyLong_FromLong, but this should be invisible to the user. For Python 3 there should be absolutely no change. gdb/ChangeLog: * python/py-inferior.c (infpy_get_connection_num): Call gdb_py_object_from_longest instead of PyLong_FromLong directly.
Diffstat (limited to 'sim')
0 files changed, 0 insertions, 0 deletions