This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] python: Make two functions return gdbpy_ref<>
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Sat, 08 Sep 2018 20:55:44 -0600
- Subject: Re: [PATCH] python: Make two functions return gdbpy_ref<>
- References: <1536448885-6222-1-git-send-email-simon.marchi@ericsson.com>
>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
Simon> I noticed that we release a gdbpy_ref in pretty_print_one_value only to
Simon> create it again later. This patch fills the gap by returning a
Simon> gdbpy_ref all the way.
Simon> gdb/ChangeLog:
Simon> * python/py-prettyprint.c (pretty_print_one_value): Return
Simon> gdbpy_ref<>.
Simon> (print_string_repr): Adjust.
Simon> (apply_varobj_pretty_printer): Return gdbpy_ref<>.
Simon> * python/python-internal.h (apply_varobj_pretty_printer): Return
Simon> gdbpy_ref<>.
Simon> * varobj.c (varobj_value_get_print_value): Adjust.
Thanks, this seems like a good improvement to me.
I'm sure there are more of these lurking.
Tom