From 5038964414cb7f8350b1b89bd95ef78125effb33 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 25 Nov 2010 13:10:07 +0000 Subject: * breakpoint.h: No longer include python.h or python-internal.h. (struct breakpoint_object): Forward declare. * defs.h (PyObject) [!HAVE_PYTHON]: Don't define. * varobj.c (PyObject) [!HAVE_PYTHON]: Define. * python/py-breakpoint.c (build_bp_list): Cast py_bp_object to PyObject pointer. (gdbpy_breakpoint_created): Remove casts around py_bp_object accesses. --- gdb/python/py-breakpoint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/python/py-breakpoint.c') diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index 8afa414..64e30ef 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -636,7 +636,7 @@ static int build_bp_list (struct breakpoint *b, void *arg) { PyObject *list = arg; - PyObject *bp = b->py_bp_object; + PyObject *bp = (PyObject *) b->py_bp_object; int iserr = 0; /* Not all breakpoints will have a companion Python object. @@ -718,7 +718,7 @@ gdbpy_breakpoint_created (int num) { newbp->number = num; newbp->bp = bp; - newbp->bp->py_bp_object = (PyObject *) newbp; + newbp->bp->py_bp_object = newbp; Py_INCREF (newbp); ++bppy_live; } @@ -746,7 +746,7 @@ gdbpy_breakpoint_deleted (int num) if (! bp) return; - bp_obj = ((breakpoint_object *) bp->py_bp_object); + bp_obj = bp->py_bp_object; if (bp_obj) { bp_obj->bp = NULL; -- cgit v1.1