* python/py-utils.c (gdb_pymodule_addobject): Cast away const.
This commit is contained in:
parent
b77420921a
commit
351a6f0219
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue