From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 0/2] [gdb/python] Remove Py_RETURN_{NONE,TRUE,FALSE}
Date: Wed, 13 May 2026 08:44:05 -0600 [thread overview]
Message-ID: <8733zvmksq.fsf@tromey.com> (raw)
In-Reply-To: <20260512163438.2446764-1-tdevries@suse.de> (Tom de Vries's message of "Tue, 12 May 2026 18:34:36 +0200")
Tom> The only point of it seems to be to increase the reference count on the
Tom> Py_None object for older python versions.
Tom> ISTM unnecessary to increase the reference count for each Py_RETURN_NONE use.
I mentioned this in the bug, but for the record on the list, I think
this patch will not work for versions of Python before the immortality
changes.
In particular if a gdb method returns a new reference, it means the
caller is free to decref the reference. However this series changes gdb
to assume that the decref will not happen for certain objects.
thanks,
Tom
next prev parent reply other threads:[~2026-05-13 14:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 16:34 Tom de Vries
2026-05-12 16:34 ` [PATCH 1/2] [gdb/python] Add init_py_immortals Tom de Vries
2026-05-12 16:34 ` [PATCH 2/2] [gdb/python] Remove Py_RETURN_{NONE,TRUE,FALSE} Tom de Vries
2026-05-13 14:44 ` Tom Tromey [this message]
2026-05-13 16:42 ` [PATCH 0/2] " Tom de Vries
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=8733zvmksq.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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