This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Python 2.4 compile failure (Re: [PATCH 24/28] introduce gdb_pymodule_addobject)


Ulrich> Now I guess 2.4 is quite old, but it is still supported according to
Ulrich> GDB documentation (and there are some special cases in the sources) ...

Ulrich> Should this be fixed?

Yes.  Can you please try the appended?

Tom

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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]