change delegation for to_read_description
[deliverable/binutils-gdb.git] / gdb / python / py-threadevent.c
index 7963412e08552f07f3d0454a24a0f6d1df587143..43fd83dd42438b71078b5d0ead331c810b11faf3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "defs.h"
 #include "py-event.h"
 
 /* thread events can either be thread specific or process wide.  If gdb is
    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.  */
+   Py_None otherwise.  In each case it returns a borrowed reference.  */
+
+static PyObject *get_event_thread (void)
+  CPYCHECKER_RETURNS_BORROWED_REF;
 
 static PyObject *
 get_event_thread (void)
@@ -39,8 +43,6 @@ get_event_thread (void)
       return NULL;
     }
 
-  Py_INCREF (thread);
-
   return thread;
 }
 
This page took 0.02467 seconds and 4 git commands to generate.