CPYCHECKER_STEALS_REFERENCE_TO_ARG.
* python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
New macro.
2013-05-20 Tom Tromey <tromey@redhat.com>
+ * python/py-event.h (evpy_emit_event): Use
+ CPYCHECKER_STEALS_REFERENCE_TO_ARG.
+ * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
+ New macro.
+
+2013-05-20 Tom Tromey <tromey@redhat.com>
+
* py-evtregistry.c (create_event_object): Decref
eventregistry_object if PyList_New fails.
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);
#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG)
#endif
+#ifdef WITH_CPYCHECKER_STEALS_REFERENCE_TO_ARG_ATTRIBUTE
+#define CPYCHECKER_STEALS_REFERENCE_TO_ARG(n) \
+ __attribute__ ((cpychecker_steals_reference_to_arg (n)))
+#else
+#define CPYCHECKER_STEALS_REFERENCE_TO_ARG(n)
+#endif
+
#include <stdio.h>
/* Python 2.4 doesn't include stdint.h soon enough to get {u,}intptr_t