aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/python-internal.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index f47d48a..d947be6 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -176,7 +176,10 @@ typedef unsigned long gdb_py_ulongest;
static inline void
gdb_Py_DECREF (void *op) /* ARI: editCase function */
{
- Py_DECREF (op);
+ /* ... and Python 2.4 didn't cast OP to PyObject pointer on the
+ '(op)->ob_refcnt' references within the macro. Cast it ourselves
+ too. */
+ Py_DECREF ((PyObject *) op);
}
#undef Py_DECREF