aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-utils.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-06-05 17:32:51 +0000
committerTom Tromey <tromey@redhat.com>2013-06-05 17:32:51 +0000
commit351a6f0219ca55bda51307e064b18aaaa79b5521 (patch)
tree10ca03ffca94bc268458d0103fb407b7ee6e289b /gdb/python/py-utils.c
parentb77420921a4dc28e5b75fcbfb3a34ea21d512ad2 (diff)
downloadgdb-351a6f0219ca55bda51307e064b18aaaa79b5521.zip
gdb-351a6f0219ca55bda51307e064b18aaaa79b5521.tar.gz
gdb-351a6f0219ca55bda51307e064b18aaaa79b5521.tar.bz2
* python/py-utils.c (gdb_pymodule_addobject): Cast away const.
Diffstat (limited to 'gdb/python/py-utils.c')
-rw-r--r--gdb/python/py-utils.c3
1 files changed, 2 insertions, 1 deletions
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;