From 351a6f0219ca55bda51307e064b18aaaa79b5521 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 5 Jun 2013 17:32:51 +0000 Subject: [PATCH] * python/py-utils.c (gdb_pymodule_addobject): Cast away const. --- gdb/ChangeLog | 4 ++++ gdb/python/py-utils.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6b56ef5..61a867d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-06-05 Tom Tromey + + * python/py-utils.c (gdb_pymodule_addobject): Cast away const. + 2013-06-04 Sergio Durigan Junior Pedro Alves diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index 7c7c5ca..bbbdef4 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -436,7 +436,8 @@ gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object) int result; Py_INCREF (object); - result = PyModule_AddObject (module, name, object); + /* Python 2.4 did not have a 'const' here. */ + result = PyModule_AddObject (module, (char *) name, object); if (result < 0) Py_DECREF (object); return result; -- 2.7.4