Index: gdb/python/py-event.h |
diff --git a/gdb/python/py-event.h b/gdb/python/py-event.h |
index e54c17a503b590ecb8a4cccc40e37f8a103c40ec..f0ff629875dd22300538ff8b1fca3dac47092ec8 100644 |
--- a/gdb/python/py-event.h |
+++ b/gdb/python/py-event.h |
@@ -1,6 +1,6 @@ |
/* Python interface to inferior events. |
- Copyright (C) 2009-2012 Free Software Foundation, Inc. |
+ Copyright (C) 2009-2013 Free Software Foundation, Inc. |
This file is part of GDB. |
@@ -20,7 +20,6 @@ |
#ifndef GDB_PY_EVENT_H |
#define GDB_PY_EVENT_H |
-#include "defs.h" |
#include "py-events.h" |
#include "command.h" |
#include "python-internal.h" |
@@ -47,10 +46,10 @@ |
#define GDBPY_NEW_EVENT_TYPE(name, py_path, py_name, doc, base, qual) \ |
\ |
- qual PyTypeObject name##_event_object_type = \ |
- { \ |
- PyObject_HEAD_INIT (NULL) \ |
- 0, /* ob_size */ \ |
+ qual PyTypeObject name##_event_object_type \ |
+ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object") \ |
+ = { \ |
+ PyVarObject_HEAD_INIT (NULL, 0) \ |
py_path, /* tp_name */ \ |
sizeof (event_object), /* tp_basicsize */ \ |
0, /* tp_itemsize */ \ |
@@ -89,11 +88,11 @@ |
0 /* tp_alloc */ \ |
}; \ |
\ |
-void \ |
+int \ |
gdbpy_initialize_##name##_event (void) \ |
{ \ |
- gdbpy_initialize_event_generic (&name##_event_object_type, \ |
- py_name); \ |
+ return gdbpy_initialize_event_generic (&name##_event_object_type, \ |
+ py_name); \ |
} |
typedef struct |
@@ -107,7 +106,8 @@ extern int emit_continue_event (ptid_t ptid); |
extern int emit_exited_event (const LONGEST *exit_code, struct inferior *inf); |
extern int evpy_emit_event (PyObject *event, |
- eventregistry_object *registry); |
+ eventregistry_object *registry) |
+ CPYCHECKER_STEALS_REFERENCE_TO_ARG (1); |
extern PyObject *create_event_object (PyTypeObject *py_type); |
extern PyObject *create_thread_event_object (PyTypeObject *py_type); |
@@ -115,8 +115,9 @@ extern int emit_new_objfile_event (struct objfile *objfile); |
extern void evpy_dealloc (PyObject *self); |
extern int evpy_add_attribute (PyObject *event, |
- char *name, PyObject *attr); |
-int gdbpy_initialize_event_generic (PyTypeObject *type, char *name); |
- |
+ char *name, PyObject *attr) |
+ CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION; |
+int gdbpy_initialize_event_generic (PyTypeObject *type, char *name) |
+ CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION; |
#endif /* GDB_PY_EVENT_H */ |