Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: gdb/python/py-event.h

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/python/py-continueevent.c ('k') | gdb/python/py-event.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 */
« no previous file with comments | « gdb/python/py-continueevent.c ('k') | gdb/python/py-event.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698