This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[python] build fix for python 2.4
- From: Tom Tromey <tromey at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Thu, 20 Nov 2008 08:53:18 -0700
- Subject: [python] build fix for python 2.4
- Reply-to: tromey at redhat dot com
I needed this to build against Python 2.4.
Tom
2008-11-20 Tom Tromey <tromey@redhat.com>
* python/python-type.c (gdbpy_initialize_types): Add cast for
Python 2.4.
diff --git a/gdb/python/python-type.c b/gdb/python/python-type.c
index 31af1ed..d52d1f4 100644
--- a/gdb/python/python-type.c
+++ b/gdb/python/python-type.c
@@ -674,7 +674,8 @@ gdbpy_initialize_types (void)
for (i = 0; pyty_codes[i].name; ++i)
{
if (PyModule_AddIntConstant (gdb_module,
- pyty_codes[i].name,
+ /* Cast needed for Python 2.4. */
+ (char *) pyty_codes[i].name,
pyty_codes[i].code) < 0)
return;
}