Use gdbpy_ref in py-cmd.c
authorTom Tromey <tom@tromey.com>
Sun, 20 Nov 2016 17:23:08 +0000 (10:23 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 11 Jan 2017 02:14:01 +0000 (19:14 -0700)
commit905f2ccab1b7070c7953e9f12de638e2dc147a9a
treea501a8cd1c13828313df4ca2f93cc213710177e3
parent64081434cce13f38288d82d3d31b6199e9deff4a
Use gdbpy_ref in py-cmd.c

This changes py-cmd.c to use gdbpy_ref in more places.  This also
fixes a latent memory leak in cmdpy_completer_helper, which
unnecessarily increfs the result of PyObject_CallMethodObjArgs.  This
is not needed because that function returns a new reference.

2017-01-10  Tom Tromey  <tom@tromey.com>

* python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
extra incref.
(cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
Use gdbpy_ref.
gdb/ChangeLog
gdb/python/py-cmd.c
This page took 0.025709 seconds and 4 git commands to generate.