Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 3/4] Use gdbpy_borrowed_ref when creating events
Date: Mon, 14 Sep 2026 11:46:10 -0400	[thread overview]
Message-ID: <44ab10fa-d372-49fa-98d1-7087840e1d93@simark.ca> (raw)
In-Reply-To: <20260808-python-safety-events-simple-v1-3-132aea40c801@tromey.com>

On 8/8/26 5:47 PM, Tom Tromey wrote:
> diff --git a/gdb/python/py-threadevent.c b/gdb/python/py-threadevent.c
> index 9b0a963d0ba..a4a0c16dffc 100644
> --- a/gdb/python/py-threadevent.c
> +++ b/gdb/python/py-threadevent.c
> @@ -37,7 +37,7 @@ py_get_event_thread (ptid_t ptid)
>  }
>  
>  gdbpy_ref<>
> -create_thread_event_object (PyTypeObject *py_type, PyObject *thread)
> +create_thread_event_object (PyTypeObject *py_type, gdbpy_borrowed_ref<> thread)
>  {
>    gdb_assert (thread != NULL);

You can remove the assert since THREAD can't contain nullptr.

Simon

  reply	other threads:[~2026-09-14 15:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08 21:47 [PATCH 0/4] Use gdbpy_borrowed_ref more + cast removal Tom Tromey
2026-08-08 21:47 ` [PATCH 1/4] Change evpy_emit_event to accept a gdbpy_opt_borrowed_ref Tom Tromey
2026-09-14 15:42   ` Simon Marchi
2026-09-14 16:59     ` Tom Tromey
2026-09-14 19:58       ` Simon Marchi
2026-09-14 17:42     ` Tom Tromey
2026-09-14 18:27       ` Tom Tromey
2026-08-08 21:47 ` [PATCH 2/4] Change evpy_add_attribute to accept gdbpy_borrowed_ref Tom Tromey
2026-08-08 21:47 ` [PATCH 3/4] Use gdbpy_borrowed_ref when creating events Tom Tromey
2026-09-14 15:46   ` Simon Marchi [this message]
2026-08-08 21:47 ` [PATCH 4/4] Remove unneeded casts to PyObject* Tom Tromey
2026-09-14 15:48 ` [PATCH 0/4] Use gdbpy_borrowed_ref more + cast removal Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44ab10fa-d372-49fa-98d1-7087840e1d93@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox