Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Add some const-ness to py-cmd.c
@ 2013-12-08  8:05 Doug Evans
  2013-12-09 10:39 ` Phil Muldoon
  2013-12-10 20:57 ` Tom Tromey
  0 siblings, 2 replies; 11+ messages in thread
From: Doug Evans @ 2013-12-08  8:05 UTC (permalink / raw)
  To: gdb-patches

Hi.

When can we drop support for older Python versions?

2013-12-08  Doug Evans  <xdje42@gmail.com>

	* python/py-cmd.c (struct cmdpy_completer): Add comment.
	(completers): Make const.

diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index c0e9d96..c845c7c 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -32,13 +32,15 @@
 /* Struct representing built-in completion types.  */
 struct cmdpy_completer
 {
-  /* Python symbol name.  */
+  /* Python symbol name.
+     This isn't a const char * for Python 2.4's sake.
+     PyModule_AddIntConstant only takes a char *, sigh.  */
   char *name;
   /* Completion function.  */
   completer_ftype *completer;
 };
 
-static struct cmdpy_completer completers[] =
+static const struct cmdpy_completer completers[] =
 {
   { "COMPLETE_NONE", noop_completer },
   { "COMPLETE_FILENAME", filename_completer },


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-12-11 15:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-08  8:05 [PATCH] Add some const-ness to py-cmd.c Doug Evans
2013-12-09 10:39 ` Phil Muldoon
2013-12-10 20:57 ` Tom Tromey
2013-12-11  3:24   ` Tom Tromey
2013-12-11  7:53     ` Joel Brobecker
2013-12-11  8:11       ` Jan Kratochvil
2013-12-11 15:12       ` Tom Tromey
2013-12-11 15:36         ` Joel Brobecker
2013-12-11 15:43           ` Tom Tromey
2013-12-11 15:56             ` Joel Brobecker
2013-12-11 15:57           ` Phil Muldoon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox