This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 01/14] Introduce py-ref.h


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> Since there's no need to worry about noexcept garantees here
Pedro> (destructing a gdbpy_ref can't throw), I'd rather that
Pedro> move would not be implemented as a swap, as that extends the
Pedro> lifetime of m_obj in OTHER.
[...]
Pedro> Or perhaps simpler, go with something like what you had in the
Pedro> first version:

I made this change.

Pedro> But add a "if (this != &other)" check.  I'd tweak it to be
Pedro> in terms of reset() while at it:

I also changed the other operator= to use reset(), and I changed the
code to use Py_XINCREF rather than a NULL check.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]