Use ui_file_as_string in gdb/python/
gdb/ChangeLog: 2016-11-08 Pedro Alves <palves@redhat.com> * python/py-arch.c (archpy_disassemble): Use ui_file_as_string and std::string. * python/py-breakpoint.c (bppy_get_commands): Use ui_file_as_string and std::string. * python/py-frame.c (frapy_str): Likewise. * python/py-type.c (typy_str): Likewise. * python/py-unwind.c (unwind_infopy_str): Likewise. * python/py-value.c (valpy_str): Likewise.
This commit is contained in:
parent
02030646c2
commit
c92aed165e
7 changed files with 30 additions and 31 deletions
|
@ -236,12 +236,9 @@ unwind_infopy_str (PyObject *self)
|
|||
}
|
||||
fprintf_unfiltered (strfile, ")");
|
||||
}
|
||||
{
|
||||
char *s = ui_file_xstrdup (strfile, NULL);
|
||||
|
||||
result = PyString_FromString (s);
|
||||
xfree (s);
|
||||
}
|
||||
std::string s = ui_file_as_string (strfile);
|
||||
result = PyString_FromString (s.c_str ());
|
||||
ui_file_delete (strfile);
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue