]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* python/py-event.h (gdbpy_initialize_event_generic): Use
authorTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:19:54 +0000 (20:19 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:19:54 +0000 (20:19 +0000)
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
* python/py-evts.c (add_new_registry): Use
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
* python/python-internal.h
(CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION): New macro.

gdb/ChangeLog
gdb/python/py-event.h
gdb/python/py-evts.c
gdb/python/python-internal.h

index cb3768c3ef4ee0b0df556b2fdd7dca655a7abf8e..949ae1953b68976d6f5bdbd9e805e775c4e6320d 100644 (file)
@@ -1,3 +1,12 @@
+2013-05-20  Tom Tromey  <tromey@redhat.com>
+
+       * python/py-event.h (gdbpy_initialize_event_generic): Use
+       CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
+       * python/py-evts.c (add_new_registry): Use
+       CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
+       * python/python-internal.h
+       (CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION): New macro.
+
 2013-05-20  Tom Tromey  <tromey@redhat.com>
 
        * python/py-arch.c (archpy_disassemble): Update.
index 1db8bd2e868d71ca4f4ec750ad1df730c06049b6..4850f1a3e4548160c8c1ea481fe0bc4822e51379 100644 (file)
@@ -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 */
index 4c079e2b5b116eebe71f21b13f7794ce1d4678c2..427b6d5b52e14e3f1f4ccf75fd2ae7ab0f9712f3 100644 (file)
@@ -37,7 +37,7 @@ static struct PyModuleDef EventModuleDef =
 
 /* Initialize python events.  */
 
-static int
+static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
 add_new_registry (eventregistry_object **registryp, char *name)
 {
   *registryp = create_eventregistry_object ();
index 2b4244c01b5553d62e9e071c6da1f7d0eb9b383f..2e090963baf4d54e0eb1f8d3e6a280ffdf202d04 100644 (file)
 #define CPYCHECKER_SETS_EXCEPTION
 #endif
 
+#ifdef WITH_CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION_ATTRIBUTE
+#define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION              \
+  __attribute__ ((cpychecker_negative_result_sets_exception))
+#else
+#define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
+#endif
+
 #include <stdio.h>
 
 /* Python 2.4 doesn't include stdint.h soon enough to get {u,}intptr_t