public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [commit] minor cleanups in py-cmd.c
@ 2014-05-14  2:46 Doug Evans
  0 siblings, 0 replies; only message in thread
From: Doug Evans @ 2014-05-14  2:46 UTC (permalink / raw)
  To: gdb-patches

Hi.

fyi, I committed this.

2014-05-13  Doug Evans  <xdje42@gmail.com>

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

diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index c24bca7..524ba5a 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] only message in thread

only message in thread, other threads:[~2014-05-14  2:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-14  2:46 [commit] minor cleanups in py-cmd.c Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).