diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2018-09-09 08:13:17 +0100 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-09-09 08:13:17 +0100 |
commit | a5c5eda7e412aa7f3cb843cd48b3b4c0101718a0 (patch) | |
tree | 74531596833e161980e941f3f355d3f9d0664264 /gdb/varobj.c | |
parent | 1aac008f1c2f0a239b7ba26efe9d6b68044cddf8 (diff) | |
download | gdb-a5c5eda7e412aa7f3cb843cd48b3b4c0101718a0.zip gdb-a5c5eda7e412aa7f3cb843cd48b3b4c0101718a0.tar.gz gdb-a5c5eda7e412aa7f3cb843cd48b3b4c0101718a0.tar.bz2 |
python: Make two functions return gdbpy_ref<>
I noticed that we release a gdbpy_ref in pretty_print_one_value only to
create it again later. This patch fills the gap by returning a
gdbpy_ref all the way.
gdb/ChangeLog:
* python/py-prettyprint.c (pretty_print_one_value): Return
gdbpy_ref<>.
(print_string_repr): Adjust.
(apply_varobj_pretty_printer): Return gdbpy_ref<>.
* python/python-internal.h (apply_varobj_pretty_printer): Return
gdbpy_ref<>.
* varobj.c (varobj_value_get_print_value): Adjust.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index af60796..e109926 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -2318,9 +2318,9 @@ varobj_value_get_print_value (struct value *value, { struct value *replacement; - gdbpy_ref<> output (apply_varobj_pretty_printer (value_formatter, - &replacement, - &stb)); + gdbpy_ref<> output = apply_varobj_pretty_printer (value_formatter, + &replacement, + &stb); /* If we have string like output ... */ if (output != NULL) |