gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr
The motivation is to reduce the number of places where unmanaged pointers are returned from allocation type routines. All of the callers are updated. There should be no user visible changes after this commit.
This commit is contained in:
parent
2bb7589ddf
commit
8579fd136a
34 changed files with 119 additions and 151 deletions
|
@ -781,7 +781,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
if (lineobj != NULL)
|
||||
{
|
||||
if (PyInt_Check (lineobj))
|
||||
line.reset (xstrprintf ("%ld", PyInt_AsLong (lineobj)));
|
||||
line = xstrprintf ("%ld", PyInt_AsLong (lineobj));
|
||||
else if (PyString_Check (lineobj))
|
||||
line = python_string_to_host_string (lineobj);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue