[binutils-gdb] Avoid some manual memory management in Python

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Thu Aug 3 23:35:00 GMT 2017


*** TEST RESULTS FOR COMMIT 7f968c899f21643322dcfaf807ec7d7bee7c9974 ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 7f968c899f21643322dcfaf807ec7d7bee7c9974

Avoid some manual memory management in Python

This changes a few places in the Python code to avoid manual memory
management, in favor of letting std::string do the work.

ChangeLog
2017-08-03  Tom Tromey  <tom@tromey.com>

	* python/python.c (compute_python_string): Return std::string.
	(gdbpy_eval_from_control_command): Update.
	(do_start_initialization): Use std::string.
	* python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
	xstrprintf.
	* python/py-breakpoint.c (local_setattro): Use string_printf, not
	xstrprintf.



More information about the Gdb-testers mailing list