diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:16:57 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:16:57 +0000 |
commit | 9b08f22510e19e1f5d8d3849a4ffdd6090c9bfea (patch) | |
tree | d697326fbe710d055aabc97d1b50f808f48b8e7e /gdb | |
parent | f04010ffab35dc11d5b072f2f6bc5ba6022c3c2d (diff) | |
download | gdb-9b08f22510e19e1f5d8d3849a4ffdd6090c9bfea.zip gdb-9b08f22510e19e1f5d8d3849a4ffdd6090c9bfea.tar.gz gdb-9b08f22510e19e1f5d8d3849a4ffdd6090c9bfea.tar.bz2 |
* python/py-event.h (evpy_emit_event): Use
CPYCHECKER_STEALS_REFERENCE_TO_ARG.
* python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
New macro.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/python/py-event.h | 3 | ||||
-rw-r--r-- | gdb/python/python-internal.h | 7 |
3 files changed, 16 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8b417da..49c10bc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 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. diff --git a/gdb/python/py-event.h b/gdb/python/py-event.h index 970595b..1db8bd2 100644 --- a/gdb/python/py-event.h +++ b/gdb/python/py-event.h @@ -106,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); diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 8552c87..2792562 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -40,6 +40,13 @@ #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 |