mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-23 18:26:47 +08:00
* 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:
@ -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);
|
||||
|
Reference in New Issue
Block a user