binutils-gdb/gdb/python
Tom Tromey 50315b2177 Add gdb_ref_ptr.h
This adds a new gdb_ref_ptr.h, that implements a reference-counting
smart pointer class, where the user of the class supplies a
reference-counting policy object.

This class will be used in the next patch, which changes most explicit
BFD reference counts to use this new type.  Meanwhile, this patch
changes gdbpy_ref to be a specialization of this new class.

This change required adding new nullptr_t overloads some operators in
gdb_ref_ptr.h.  I suspect this was needed because some Python header
redefines NULL, but I'm not certain.

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

	* common/gdb_ref_ptr.h: New file.
	* python/py-ref.h (struct gdbpy_ref_policy): New.
	(gdbpy_ref): Now a typedef.
2017-01-10 19:14:09 -07:00
..
lib/gdb update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-arch.c Use gdbpy_ref in archpy_disassemble 2017-01-10 19:13:59 -07:00
py-auto-load.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-block.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-bpevent.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-breakpoint.c Use gdbpy_ref in gdbpy_breakpoint_cond_says_stop 2017-01-10 19:14:00 -07:00
py-cmd.c Use gdbpy_ref in py-cmd.c 2017-01-10 19:14:01 -07:00
py-continueevent.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-event.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-event.h Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-events.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-evtregistry.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-evts.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-exitedevent.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-finishbreakpoint.c Use gdbpy_ref in bpfinishpy_out_of_scope 2017-01-10 19:14:01 -07:00
py-frame.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter.c Use gdbpy_ref rather than make_cleanup_py_decref 2017-01-10 19:14:07 -07:00
py-function.c Use gdbpy_enter in fnpy_call 2017-01-10 19:13:53 -07:00
py-gdb-readline.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-inferior.c Use gdbpy_ref in py-inferior.c 2017-01-10 19:14:03 -07:00
py-infevents.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-infthread.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-lazy-string.c Change type of encoding argument to gdbpy_extract_lazy_string 2017-01-10 19:13:55 -07:00
py-linetable.c Use gdbpy_ref in py-linetable.c 2017-01-10 19:13:34 -07:00
py-newobjfileevent.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-objfile.c Use gdbpy_enter in py-objfile.c 2017-01-10 19:13:42 -07:00
py-param.c Use gdbpy_ref in py-param.c 2017-01-10 19:14:04 -07:00
py-prettyprint.c Use gdbpy_ref in py-prettyprint.c 2017-01-10 19:13:58 -07:00
py-progspace.c Use gdbpy_enter in py-progspace.c 2017-01-10 19:13:42 -07:00
py-ref.h Add gdb_ref_ptr.h 2017-01-10 19:14:09 -07:00
py-signalevent.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-stopevent.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-stopevent.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-symbol.c Use gdbpy_ref in gdbpy_lookup_symbol 2017-01-10 19:13:38 -07:00
py-symtab.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-threadevent.c Change event code to use gdbpy_ref 2017-01-10 19:13:29 -07:00
py-type.c Use gdbpy_enter in py-type.c 2017-01-10 19:13:44 -07:00
py-unwind.c Use gdbpy_ref in pyuw_object_attribute_to_pointer 2017-01-10 19:14:05 -07:00
py-utils.c Remove make_cleanup_py_decref and make_cleanup_py_xdecref 2017-01-10 19:14:08 -07:00
py-value.c Use gdbpy_ref in py-value.c 2017-01-10 19:13:37 -07:00
py-varobj.c Use gdbpy_enter_varobj in py-varobj.c 2017-01-10 19:13:51 -07:00
py-xmethods.c Use gdbpy_enter in py-xmethod.c 2017-01-10 19:13:50 -07:00
python-config.py
python-internal.h Remove make_cleanup_py_decref and make_cleanup_py_xdecref 2017-01-10 19:14:08 -07:00
python.c Use gdbpy_ref in python.c 2017-01-10 19:14:04 -07:00
python.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00