change delegation for to_read_description
[deliverable/binutils-gdb.git] / gdb / python / py-infthread.c
index 7a5f2627c1e657098ed333410aaef9858f9433bb..e03cbd923f74bb62bbebafc8f1e8a537df5b3e64 100644 (file)
@@ -1,6 +1,6 @@
 /* Python interface to inferior threads.
 
-   Copyright (C) 2009-2013 Free Software Foundation, Inc.
+   Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,7 +49,7 @@ create_thread_object (struct thread_info *tp)
     return NULL;
 
   thread_obj->thread = tp;
-  thread_obj->inf_obj = find_inferior_object (PIDGET (tp->ptid));
+  thread_obj->inf_obj = find_inferior_object (ptid_get_pid (tp->ptid));
 
   return thread_obj;
 }
@@ -95,7 +95,7 @@ thpy_set_name (PyObject *self, PyObject *newvalue, void *ignore)
 
   if (newvalue == NULL)
     {
-      PyErr_SetString (PyExc_TypeError, 
+      PyErr_SetString (PyExc_TypeError,
                       _("Cannot delete `name' attribute."));
       return -1;
     }
@@ -261,9 +261,8 @@ gdbpy_initialize_thread (void)
   if (PyType_Ready (&thread_object_type) < 0)
     return -1;
 
-  Py_INCREF (&thread_object_type);
-  return PyModule_AddObject (gdb_module, "InferiorThread",
-                            (PyObject *) &thread_object_type);
+  return gdb_pymodule_addobject (gdb_module, "InferiorThread",
+                                (PyObject *) &thread_object_type);
 }
 
 
This page took 0.027775 seconds and 4 git commands to generate.