* py-cmd.c: Some minor formatting fixes.

(gdbpy_parse_command_name): Rename text arg to name, make const.
	All callers updated.
	* python-internal.h (gdbpy_parse_command_name): Update.
This commit is contained in:
Doug Evans
2011-09-08 19:51:27 +00:00
parent 8dbb9eb3c6
commit 63d97a2024
4 changed files with 28 additions and 31 deletions

View File

@ -646,7 +646,6 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
{
parmpy_object *obj = (parmpy_object *) self;
const char *name;
char *copy;
char *set_doc, *show_doc, *doc;
char *cmd_name;
int parmclass, cmdtype;
@ -697,21 +696,16 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
obj->type = (enum var_types) parmclass;
memset (&obj->value, 0, sizeof (obj->value));
copy = xstrdup (name);
cmd_name = gdbpy_parse_command_name (copy, &set_list,
cmd_name = gdbpy_parse_command_name (name, &set_list,
&setlist);
if (! cmd_name)
{
xfree (copy);
return -1;
}
return -1;
xfree (cmd_name);
cmd_name = gdbpy_parse_command_name (copy, &show_list,
cmd_name = gdbpy_parse_command_name (name, &show_list,
&showlist);
if (! cmd_name)
return -1;
xfree (copy);
set_doc = get_doc_string (self, set_doc_cst);
show_doc = get_doc_string (self, show_doc_cst);