diff options
author | Tom Tromey <tromey@adacore.com> | 2023-04-06 09:05:58 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-04-06 10:01:10 -0600 |
commit | 55af06a70e769f4dae10d919f9ea10a802a4aac7 (patch) | |
tree | f87f2cd16480f7b402139e864a0fafaf22b926ef /gdb/extension.h | |
parent | b4f767131f75179df4f47fc40e177f2607fb1003 (diff) | |
download | gdb-55af06a70e769f4dae10d919f9ea10a802a4aac7.zip gdb-55af06a70e769f4dae10d919f9ea10a802a4aac7.tar.gz gdb-55af06a70e769f4dae10d919f9ea10a802a4aac7.tar.bz2 |
Use unique_xmalloc_ptr in apply_ext_lang_type_printers
This changes apply_ext_lang_type_printers to use unique_xmalloc_ptr,
removing some manual memory management. Regression tested on x86-64
Fedora 36.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/extension.h')
-rw-r--r-- | gdb/extension.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/extension.h b/gdb/extension.h index ab83f9c..2b04451 100644 --- a/gdb/extension.h +++ b/gdb/extension.h @@ -282,8 +282,8 @@ extern void eval_ext_lang_from_control_command (struct command_line *cmd); extern void auto_load_ext_lang_scripts_for_objfile (struct objfile *); -extern char *apply_ext_lang_type_printers (struct ext_lang_type_printers *, - struct type *); +extern gdb::unique_xmalloc_ptr<char> apply_ext_lang_type_printers + (struct ext_lang_type_printers *, struct type *); extern int apply_ext_lang_val_pretty_printer (struct value *value, struct ui_file *stream, int recurse, |