Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH v3 3/5] [gdb/python] Undefine Py_RETURN_{NONE, TRUE, FALSE, NOTIMPLEMENTED}
Date: Fri, 15 May 2026 15:58:32 +0200	[thread overview]
Message-ID: <20260515135834.2502165-3-tdevries@suse.de> (raw)
In-Reply-To: <20260515135834.2502165-1-tdevries@suse.de>

Now that we've removed all uses of Py_RETURN_{NONE,TRUE,FALSE,NOTIMPLEMENTED},
undefine them to enforce using the refcount-safe wrappers instead.
---
 gdb/python/python-internal.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 7c58309e4d4..8e20ceefd85 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -1387,4 +1387,12 @@ py_notimplemented ()
   return gdbpy_ref<> (f ());
 }
 
+/* Undefine these to enforce using the refcount-safe wrappers py_none, py_true,
+   py_false and py_notimplemented.  */
+
+#undef Py_RETURN_NONE
+#undef Py_RETURN_TRUE
+#undef Py_RETURN_FALSE
+#undef Py_RETURN_UNIMPLEMENTED
+
 #endif /* GDB_PYTHON_PYTHON_INTERNAL_H */
-- 
2.51.0


  parent reply	other threads:[~2026-05-15 14:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 13:58 [PATCH v3 1/5] [gdb/python] Introduce py_{none, true, false, notimplemented} functions Tom de Vries
2026-05-15 13:58 ` [PATCH v3 2/5] [gdb/python] Remove Py_RETURN_{NONE, TRUE, FALSE, NOTIMPLEMENTED} Tom de Vries
2026-05-15 13:58 ` Tom de Vries [this message]
2026-05-15 14:05   ` [PATCH v3 3/5] [gdb/python] Undefine " Tom de Vries
2026-05-15 17:40   ` Tom Tromey
2026-05-15 13:58 ` [PATCH v3 4/5] [gdb/python] Use py_{none,false} more often Tom de Vries
2026-05-15 17:39   ` Tom Tromey
2026-05-15 13:58 ` [PATCH v3 5/5] [gdb/python] Use py_{none,notimplemented} " Tom de Vries
2026-05-15 17:38   ` Tom Tromey
2026-05-15 17:36 ` [PATCH v3 1/5] [gdb/python] Introduce py_{none, true, false, notimplemented} functions Tom Tromey
2026-05-15 17:44   ` Tom de Vries
2026-05-15 18:36     ` Tom Tromey
2026-05-15 19:08       ` 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=20260515135834.2502165-3-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /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