* 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.
This commit is contained in:
Pedro Alves 2010-11-25 13:10:07 +00:00
parent d9a88323fe
commit 5038964414
5 changed files with 18 additions and 13 deletions

View file

@ -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;