/* 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.
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;
}
if (newvalue == NULL)
{
- PyErr_SetString (PyExc_TypeError,
+ PyErr_SetString (PyExc_TypeError,
_("Cannot delete `name' attribute."));
return -1;
}
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);
}