From 1947513d924efec8b839718cda515ecfc21dd293 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 21 Jul 2014 20:55:16 -0600 Subject: constify command docs This makes the command "doc" parameter const. 2014-07-24 Tom Tromey * cli/cli-decode.c (add_cmd, add_prefix_cmd) (add_abbrev_prefix_cmd, add_set_or_show_cmd, add_info) (add_info_alias, add_com): Make "doc" const. (print_doc_line): Make "str" const. (delete_cmd): Update. * cli/cli-decode.h (struct cmd_list_element) : Now const. (print_doc_line): Update. * cli/cli-script.c (document_command): Update. * command.h (add_cmd, add_prefix_cmd, add_abbrev_prefix_cmd) (add_com, add_info, add_info_alias): Update. * guile/scm-cmd.c (cmdscm_destroyer): Update. * python/py-cmd.c (cmdpy_destroyer): Update. --- gdb/python/py-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python') diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index f8f1f05..21f2a20 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -108,7 +108,7 @@ cmdpy_destroyer (struct cmd_list_element *self, void *context) /* We allocated the name, doc string, and perhaps the prefix name. */ xfree ((char *) self->name); - xfree (self->doc); + xfree ((char *) self->doc); xfree ((char *) self->prefixname); do_cleanups (cleanup); -- cgit v1.1