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.