forked from Imagelibrary/binutils-gdb
* python/py-threadevent.c (get_event_thread): Use
CPYCHECKER_RETURNS_BORROWED_REF. * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF): New define. (pspace_to_pspace_object, objfile_to_objfile_object) (find_thread_object): Use it.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/py-threadevent.c (get_event_thread): Use
|
||||||
|
CPYCHECKER_RETURNS_BORROWED_REF.
|
||||||
|
* python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
|
||||||
|
New define.
|
||||||
|
(pspace_to_pspace_object, objfile_to_objfile_object)
|
||||||
|
(find_thread_object): Use it.
|
||||||
|
|
||||||
2013-05-20 Tom Tromey <tromey@redhat.com>
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* python/py-arch.c (arch_object_type): Use
|
* python/py-arch.c (arch_object_type): Use
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
This function returns the currently stopped thread in non-stop mode and
|
This function returns the currently stopped thread in non-stop mode and
|
||||||
Py_None otherwise. In each case it returns a borrowed reference. */
|
Py_None otherwise. In each case it returns a borrowed reference. */
|
||||||
|
|
||||||
|
static PyObject *get_event_thread (void)
|
||||||
|
CPYCHECKER_RETURNS_BORROWED_REF;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
get_event_thread (void)
|
get_event_thread (void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,13 @@
|
|||||||
The checker defines a WITH_ macro for each attribute it
|
The checker defines a WITH_ macro for each attribute it
|
||||||
exposes. */
|
exposes. */
|
||||||
|
|
||||||
|
#ifdef WITH_CPYCHECKER_RETURNS_BORROWED_REF_ATTRIBUTE
|
||||||
|
#define CPYCHECKER_RETURNS_BORROWED_REF \
|
||||||
|
__attribute__ ((cpychecker_returns_borrowed_ref))
|
||||||
|
#else
|
||||||
|
#define CPYCHECKER_RETURNS_BORROWED_REF
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF_ATTRIBUTE
|
#ifdef WITH_CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF_ATTRIBUTE
|
||||||
#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG) \
|
#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG) \
|
||||||
__attribute__ ((cpychecker_type_object_for_typedef (ARG)))
|
__attribute__ ((cpychecker_type_object_for_typedef (ARG)))
|
||||||
@@ -269,18 +276,21 @@ PyObject *value_to_value_object (struct value *v);
|
|||||||
PyObject *type_to_type_object (struct type *);
|
PyObject *type_to_type_object (struct type *);
|
||||||
PyObject *frame_info_to_frame_object (struct frame_info *frame);
|
PyObject *frame_info_to_frame_object (struct frame_info *frame);
|
||||||
|
|
||||||
PyObject *pspace_to_pspace_object (struct program_space *);
|
PyObject *pspace_to_pspace_object (struct program_space *)
|
||||||
|
CPYCHECKER_RETURNS_BORROWED_REF;
|
||||||
PyObject *pspy_get_printers (PyObject *, void *);
|
PyObject *pspy_get_printers (PyObject *, void *);
|
||||||
PyObject *pspy_get_frame_filters (PyObject *, void *);
|
PyObject *pspy_get_frame_filters (PyObject *, void *);
|
||||||
|
|
||||||
PyObject *objfile_to_objfile_object (struct objfile *);
|
PyObject *objfile_to_objfile_object (struct objfile *)
|
||||||
|
CPYCHECKER_RETURNS_BORROWED_REF;
|
||||||
PyObject *objfpy_get_printers (PyObject *, void *);
|
PyObject *objfpy_get_printers (PyObject *, void *);
|
||||||
PyObject *objfpy_get_frame_filters (PyObject *, void *);
|
PyObject *objfpy_get_frame_filters (PyObject *, void *);
|
||||||
|
|
||||||
PyObject *gdbarch_to_arch_object (struct gdbarch *gdbarch);
|
PyObject *gdbarch_to_arch_object (struct gdbarch *gdbarch);
|
||||||
|
|
||||||
thread_object *create_thread_object (struct thread_info *tp);
|
thread_object *create_thread_object (struct thread_info *tp);
|
||||||
thread_object *find_thread_object (ptid_t ptid);
|
thread_object *find_thread_object (ptid_t ptid)
|
||||||
|
CPYCHECKER_RETURNS_BORROWED_REF;
|
||||||
PyObject *find_inferior_object (int pid);
|
PyObject *find_inferior_object (int pid);
|
||||||
PyObject *inferior_to_inferior_object (struct inferior *inferior);
|
PyObject *inferior_to_inferior_object (struct inferior *inferior);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user