mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-29 07:10:55 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user