aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-11-25 13:10:07 +0000
committerPedro Alves <palves@redhat.com>2010-11-25 13:10:07 +0000
commit5038964414cb7f8350b1b89bd95ef78125effb33 (patch)
treefd1248d281ccd6ef531e25372644e79eba1ab678 /gdb/python
parentd9a88323fe1c249d1b2338ad58fbe9ebcbe80fd3 (diff)
downloadgdb-5038964414cb7f8350b1b89bd95ef78125effb33.zip
gdb-5038964414cb7f8350b1b89bd95ef78125effb33.tar.gz
gdb-5038964414cb7f8350b1b89bd95ef78125effb33.tar.bz2
* 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.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-breakpoint.c6
1 files changed, 3 insertions, 3 deletions
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;