public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Introduce ref_ptr::new_reference
@ 2018-04-30 21:46 sergiodj+buildbot
  2018-04-30 21:49 ` *** COMPILATION FAILED *** Failures on Fedora-i686, branch master *** BREAKAGE *** sergiodj+buildbot
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: sergiodj+buildbot @ 2018-04-30 21:46 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 7c1b5f3db73d7ecab03dc4e866e291582935fb04 ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 7c1b5f3db73d7ecab03dc4e866e291582935fb04

Introduce ref_ptr::new_reference

I noticed a common pattern with gdb::ref_ptr, where callers would
"incref" and then create a new wrapper object, like:

    Py_INCREF (obj);
    gdbpy_ref<> ref (obj);

The ref_ptr constructor intentionally does not acquire a new
reference, but it seemed to me that it would be reasonable to add a
static member function that does so.

In this patch I chose to call the function "new_reference".  I
considered "acquire_reference" as well, but "new" seemed less
ambiguous than "acquire" to me.

ChangeLog
2018-04-30  Tom Tromey  <tom@tromey.com>

	* common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
	method.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-05-01 14:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 21:46 [binutils-gdb] Introduce ref_ptr::new_reference sergiodj+buildbot
2018-04-30 21:49 ` *** COMPILATION FAILED *** Failures on Fedora-i686, branch master *** BREAKAGE *** sergiodj+buildbot
2018-04-30 21:56 ` Failures on Fedora-x86_64-m64, branch master sergiodj+buildbot
2018-04-30 22:02 ` Failures on RHEL-s390x-m64, " sergiodj+buildbot
2018-04-30 22:07 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2018-04-30 22:10 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2018-04-30 22:16 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2018-04-30 22:27 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE *** sergiodj+buildbot
2018-04-30 22:29 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch master sergiodj+buildbot
2018-05-01  1:05 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2018-05-01  1:12 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2018-05-01  1:43 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2018-05-01 12:47 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot
2018-05-01 13:22 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot
2018-05-01 14:54 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).