aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/python/python-internal.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7c00a8e..76e0d60 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-30 Pedro Alves <palves@redhat.com>
+
+ * python/python-internal.h (gdb_Py_DECREF): Cast OP to PyObject
+ pointer.
+
2013-05-30 Yao Qi <yao@codesourcery.com>
* remote.c (remote_check_symbols): Remove unused parameter
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