[PATCH] python: Make two functions return gdbpy_ref<>

Simon Marchi simon.marchi@polymtl.ca
Sun Sep 9 07:14:00 GMT 2018


On 2018-09-09 03:55, Tom Tromey wrote:
>>>>>> "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.

Thanks, I pushed it.

Simon



More information about the Gdb-patches mailing list