/* Add the attribute ATTR to the event object EVENT. In
python this attribute will be accessible by the name NAME.
- returns 0 if the operation succeeds and -1 otherwise. */
+ returns 0 if the operation succeeds and -1 otherwise. This
+ function acquires a new reference to ATTR. */
int
evpy_add_attribute (PyObject *event, char *name, PyObject *attr)
return -1;
}
+static PyGetSetDef event_object_getset[] =
+{
+ { "__dict__", gdb_py_generic_dict, NULL,
+ "The __dict__ for this event.", &event_object_type },
+ { NULL }
+};
+
PyTypeObject event_object_type =
{
PyObject_HEAD_INIT (NULL)
0, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
- 0, /* tp_getset */
+ event_object_getset, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */