From db1337cc8300bb44f8ccf9dced3e122b6e50b4c9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 12 Sep 2018 23:15:48 -0600 Subject: Change thread_to_thread_object to return a new reference This changes thread_to_thread_object to return a new reference and fixes up all the callers. gdb/ChangeLog 2018-09-16 Tom Tromey * python/python-internal.h (thread_to_thread_object): Change return type. * python/py-inferior.c (thread_to_thread_object): Return a new reference. (infpy_thread_from_thread_handle): Update. * python/py-infthread.c (gdbpy_selected_thread): Update. * python/py-stopevent.c (create_stop_event_object): Update. * python/py-threadevent.c (py_get_event_thread): Return a new reference. (py_get_event_thread): Update. * python/py-event.h (py_get_event_thread): Change return type. * python/py-continueevent.c (create_continue_event_object): Update. --- gdb/python/py-event.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gdb/python/py-event.h') diff --git a/gdb/python/py-event.h b/gdb/python/py-event.h index 56003e8..96be83b 100644 --- a/gdb/python/py-event.h +++ b/gdb/python/py-event.h @@ -68,9 +68,8 @@ extern gdbpy_ref<> create_event_object (PyTypeObject *py_type); running in non-stop mode then the event is thread specific, otherwise it is process wide. This function returns the currently stopped thread in non-stop mode and - Py_None otherwise. In each case it returns a borrowed reference. */ -extern PyObject *py_get_event_thread (ptid_t ptid) - CPYCHECKER_RETURNS_BORROWED_REF; + Py_None otherwise. */ +extern gdbpy_ref<> py_get_event_thread (ptid_t ptid); extern gdbpy_ref<> create_thread_event_object (PyTypeObject *py_type, PyObject *thread); -- cgit v1.1