mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
change and rename gmp_string_asprintf to return an std::string
This was suggested by Simon during a code review of this package upstream. The upside is that this makes the function's API more natural and C++. The downside is an extra malloc, which might be the reason why we went for using a unique_xmalloc_ptr in the first place. Since this function is not expected to be called frequently, the API improvement might be worth the performance impact. gdb/ChangeLog: * gmp-utils.h (gmp_string_printf): Rename from gmp_string_asprintf. Change return type to std::string. Update all callers. * gmp-utils.c (gmp_string_printf): Likewise.
This commit is contained in:
@ -4927,7 +4927,7 @@ static void
|
||||
print_fixed_point_type_info (struct type *type, int spaces)
|
||||
{
|
||||
printfi_filtered (spaces + 2, "scaling factor: %s\n",
|
||||
fixed_point_scaling_factor (type).str ().get ());
|
||||
fixed_point_scaling_factor (type).str ().c_str ());
|
||||
}
|
||||
|
||||
static struct obstack dont_print_type_obstack;
|
||||
|
Reference in New Issue
Block a user