Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/2] [gdb/python] Remove Py_RETURN_{NONE,TRUE,FALSE}
@ 2026-05-13 16:30 Tom de Vries
  2026-05-13 16:30 ` [PATCH v2 1/2] [gdb/python] Introduce py_none/py_true/py_false functions Tom de Vries
  2026-05-13 16:30 ` [PATCH v2 2/2] [gdb/python] Remove Py_RETURN_{NONE,TRUE,FALSE} Tom de Vries
  0 siblings, 2 replies; 6+ messages in thread
From: Tom de Vries @ 2026-05-13 16:30 UTC (permalink / raw)
  To: gdb-patches

This patch series contains two patches.

The first introduces refcount-safe wrapper functions py_none, py_true and
py_false.

The second uses those functions instead of Py_RETURN_{NONE,TRUE,FALSE}.

Tested on x86_64-linux, with python versions 3.13.13 and 3.6.15.

Changes in v2:
- changed approach.  The approach taken in v1 was incorrect, and caused
  regressions with pre 3.12 python versions, as pointed out by Tom Tromey in a
  PR review comment.

Versions:
- v1: https://sourceware.org/pipermail/gdb-patches/2026-May/227344.html

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34145

Tom de Vries (2):
  [gdb/python] Introduce py_none/py_true/py_false functions
  [gdb/python] Remove Py_RETURN_{NONE,TRUE,FALSE}

 gdb/python/py-block.c            | 22 ++++++-------
 gdb/python/py-breakpoint.c       | 54 ++++++++++++++++----------------
 gdb/python/py-cmd.c              |  2 +-
 gdb/python/py-connection.c       |  6 ++--
 gdb/python/py-corefile.c         |  8 ++---
 gdb/python/py-disasm.c           |  6 ++--
 gdb/python/py-evtregistry.c      |  6 ++--
 gdb/python/py-finishbreakpoint.c |  2 +-
 gdb/python/py-frame.c            | 14 ++++-----
 gdb/python/py-framefilter.c      |  2 +-
 gdb/python/py-inferior.c         | 26 +++++++--------
 gdb/python/py-infthread.c        | 24 +++++++-------
 gdb/python/py-linetable.c        | 14 ++++-----
 gdb/python/py-mi.c               |  2 +-
 gdb/python/py-micmd.c            |  4 +--
 gdb/python/py-objfile.c          | 22 ++++++-------
 gdb/python/py-prettyprint.c      |  2 +-
 gdb/python/py-progspace.c        | 18 +++++------
 gdb/python/py-record-btrace.c    | 48 ++++++++++++++--------------
 gdb/python/py-record.c           | 12 +++----
 gdb/python/py-registers.c        |  2 +-
 gdb/python/py-symbol.c           | 10 +++---
 gdb/python/py-symtab.c           | 18 +++++------
 gdb/python/py-tui.c              | 10 +++---
 gdb/python/py-type.c             | 36 ++++++++++-----------
 gdb/python/py-unwind.c           | 12 +++----
 gdb/python/py-value.c            | 28 ++++++++---------
 gdb/python/py-xmethods.c         |  2 +-
 gdb/python/python-internal.h     | 23 ++++++++++++++
 gdb/python/python.c              | 28 ++++++++---------
 30 files changed, 243 insertions(+), 220 deletions(-)


base-commit: 9e95e538bc7ba805e2eb2b567edb675f12097694
-- 
2.51.0


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

end of thread, other threads:[~2026-05-15 10:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-13 16:30 [PATCH v2 0/2] [gdb/python] Remove Py_RETURN_{NONE,TRUE,FALSE} Tom de Vries
2026-05-13 16:30 ` [PATCH v2 1/2] [gdb/python] Introduce py_none/py_true/py_false functions Tom de Vries
2026-05-14 17:46   ` Tom Tromey
2026-05-15 10:53     ` Tom de Vries
2026-05-13 16:30 ` [PATCH v2 2/2] [gdb/python] Remove Py_RETURN_{NONE,TRUE,FALSE} Tom de Vries
2026-05-14 17:47   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox