Make gdb.selected_thread().inferior return a new reference
[deliverable/binutils-gdb.git] / gdb / python / py-infthread.c
index 626c15cedb56ca1789d5dd075c8592decdfd982f..31d576f7c747c5412962f46bca979e5c0fc17799 100644 (file)
@@ -162,6 +162,7 @@ thpy_get_inferior (PyObject *self, void *ignore)
   thread_object *thread_obj = (thread_object *) self;
 
   THPY_REQUIRE_VALID (thread_obj);
+  Py_INCREF (thread_obj->inf_obj);
 
   return thread_obj->inf_obj;
 }
This page took 0.023937 seconds and 4 git commands to generate.