* python/py-utils.c (gdb_pymodule_addobject): Cast away const.

This commit is contained in:
Tom Tromey 2013-06-05 17:32:51 +00:00
parent b77420921a
commit 351a6f0219
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2013-06-05 Tom Tromey <tromey@redhat.com>
* python/py-utils.c (gdb_pymodule_addobject): Cast away const.
2013-06-04 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>

View File

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