Use gdbpy_ref in archpy_disassemble
authorTom Tromey <tom@tromey.com>
Sun, 20 Nov 2016 17:10:58 +0000 (10:10 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 11 Jan 2017 02:13:59 +0000 (19:13 -0700)
commit59e9e83119a528f17afea89ee22195a95322c6d6
treeca807d1074d08e02a6c543a5a27e8e738df42ad0
parent9de10f6d53dffbec12cec9843662d5764526983d
Use gdbpy_ref in archpy_disassemble

This changes archpy_disassemble to use gdbpy_ref.  It also fixes a
latent bug where archpy_disassemble was decref'ing the results of a
all to PyArg_ParseTupleAndKeywords.  This is incorrect because
PyArg_ParseTupleAndKeywords returns borrowed references.

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

* python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
decref results of PyArg_ParseTupleAndKeywords.
gdb/ChangeLog
gdb/python/py-arch.c