From 12dfa12a3cfd4552c0cc4d7b271ab3e9c439589a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 24 Oct 2018 16:33:23 -0600 Subject: Return gdbpy_ref from gdb_py_object_from_*longest This changes gdb_py_object_from_longest and gdb_py_object_from_ulongest to return a gdbpy_ref rather than a PyObject*. gdb/ChangeLog 2018-11-04 Tom Tromey * python/python-internal.h (gdb_py_object_from_longest) (gdb_py_object_from_ulongest): Return gdbpy_ref. * python/py-value.c (valpy_int): Update. * python/py-utils.c (gdb_py_object_from_longest): Return gdbpy_ref. (gdb_py_object_from_ulongest): Likewise. * python/py-type.c (typy_get_alignof): Update. * python/py-linetable.c (ltpy_get_all_source_lines) (ltpy_entry_get_line, ltpy_entry_get_pc): Update. * python/py-block.c (blpy_get_start, blpy_get_end): Update. --- gdb/python/py-block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/python/py-block.c') diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c index 5fc33f0..f5870c6 100644 --- a/gdb/python/py-block.c +++ b/gdb/python/py-block.c @@ -110,7 +110,7 @@ blpy_get_start (PyObject *self, void *closure) BLPY_REQUIRE_VALID (self, block); - return gdb_py_object_from_ulongest (BLOCK_START (block)); + return gdb_py_object_from_ulongest (BLOCK_START (block)).release (); } static PyObject * @@ -120,7 +120,7 @@ blpy_get_end (PyObject *self, void *closure) BLPY_REQUIRE_VALID (self, block); - return gdb_py_object_from_ulongest (BLOCK_END (block)); + return gdb_py_object_from_ulongest (BLOCK_END (block)).release (); } static PyObject * -- cgit v1.1