mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 16:05:56 +08:00
Eliminate remaining gdb/guile cleanups
The remaining gdb/guile cleanups all handle the memory returned by gdbscm_scm_to_c_string. This commit makes gdbscm_scm_to_c_string return a gdb::unique_xmalloc_ptr instead of a naked pointer, and eliminates the remaining cleanups. gdb/ChangeLog: 2018-07-19 Pedro Alves <palves@redhat.com> * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a gdb::unique_xmalloc_ptr. * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x): Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr. * guile/scm-exception.c (gdbscm_exception_message_to_string): Use copy-initialization. * guile/scm-pretty-print.c (ppscm_print_children): Use gdb::unique_xmalloc_ptr instead of cleanups. (gdbscm_apply_val_pretty_printer): Remove cleanups. * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a gdb::unique_xmalloc_ptr. * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p): Adjust to use gdb::unique_xmalloc_ptr. * guile/scm-utils.c (extract_arg): Adjust. * guile/scm-value.c (gdbscm_value_field): Adjust to use gdb::unique_xmalloc_ptr instead of a cleanup.
This commit is contained in:
@ -205,7 +205,7 @@ extract_arg (char format_char, SCM arg, void *argp,
|
||||
|
||||
CHECK_TYPE (gdbscm_is_true (scm_string_p (arg)), arg, position,
|
||||
func_name, _("string"));
|
||||
*arg_ptr = gdbscm_scm_to_c_string (arg);
|
||||
*arg_ptr = gdbscm_scm_to_c_string (arg).release ();
|
||||
break;
|
||||
}
|
||||
case 't':
|
||||
|
Reference in New Issue
Block a user