/* Python interface to inferior events.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2020 Free Software Foundation, Inc.
This file is part of GDB.
Py_TYPE (self)->tp_free (self);
}
-PyObject *
+gdbpy_ref<>
create_event_object (PyTypeObject *py_type)
{
gdbpy_ref<event_object> event_obj (PyObject_New (event_object, py_type));
if (!event_obj->dict)
return NULL;
- return (PyObject*) event_obj.release ();
+ return gdbpy_ref<> ((PyObject *) event_obj.release ());
}
/* Add the attribute ATTR to the event object EVENT. In
function acquires a new reference to ATTR. */
int
-evpy_add_attribute (PyObject *event, char *name, PyObject *attr)
+evpy_add_attribute (PyObject *event, const char *name, PyObject *attr)
{
return PyObject_SetAttrString (event, name, attr);
}
int
gdbpy_initialize_event_generic (PyTypeObject *type,
- char *name)
+ const char *name)
{
if (PyType_Ready (type) < 0)
return -1;