Remove more uses of explicit reference counting in Python
authorTom Tromey <tom@tromey.com>
Thu, 27 Dec 2018 18:53:20 +0000 (11:53 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 3 Jan 2019 21:49:18 +0000 (14:49 -0700)
commit2a3c71d68d452bb6b06d199d0eb7bc0cbc2b9b25
treeb66f2e202a390bbbcfa81c574d5388fcad12d4fa
parent5c329e6ab4c7bba9b83155571b150756210001df
Remove more uses of explicit reference counting in Python

This changes some more place in the Python code to use gdbpy_ref
rather than explicit reference counting.  While doing this I found a
latent bug in typy_fields_items -- it was not checking for errors in
one spot.  I also changed valpy_dealloc to use Py_XDECREF rather than
an explicit "if".

gdb/ChangeLog
2019-01-03  Tom Tromey  <tom@tromey.com>

* python/py-value.c (valpy_dealloc): Use Py_XDECREF.
* python/py-type.c (typy_fields_items): Use gdbpy_ref.
* python/py-progspace.c (pspy_set_printers): Use gdbpy_ref.
(pspy_set_frame_filters, pspy_set_frame_unwinders)
(pspy_set_type_printers): Likewise.
* python/py-function.c (fnpy_init): Use gdbpy_ref.
* python/py-cmd.c (cmdpy_init): Use gdbpy_ref.
* python/py-objfile.c (objfpy_set_printers): Use gdbpy_ref.
(objfpy_set_frame_filters, objfpy_set_frame_unwinders)
(objfpy_set_type_printers): Likewise.
gdb/ChangeLog
gdb/python/py-cmd.c
gdb/python/py-function.c
gdb/python/py-objfile.c
gdb/python/py-progspace.c
gdb/python/py-type.c
gdb/python/py-value.c
This page took 0.033639 seconds and 4 git commands to generate.