From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 1/3] [gdb/python] Use gdbpy_err_fetch::{type, value} as getters
Date: Fri, 08 Mar 2024 13:20:11 -0700 [thread overview]
Message-ID: <87v85wpjb8.fsf@tromey.com> (raw)
In-Reply-To: <20240308152938.18166-1-tdevries@suse.de> (Tom de Vries's message of "Fri, 8 Mar 2024 16:29:36 +0100")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> - if (m_error_value.get () != nullptr && m_error_value.get () != Py_None)
Tom> - return gdbpy_obj_to_string (m_error_value.get ());
Tom> + if (this->value ().get () != nullptr && this->value ().get () != Py_None)
Tom> + return gdbpy_obj_to_string (this->value ().get ());
Tom> else
Tom> - return gdbpy_obj_to_string (m_error_type.get ());
Tom> + return gdbpy_obj_to_string (this->type ().get ());
I think it'd be better to introduce a local variable for this->value() here.
Tom
next prev parent reply other threads:[~2024-03-08 20:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 15:29 [PATCH v2 1/3] [gdb/python] Use gdbpy_err_fetch::{type,value} " Tom de Vries
2024-03-08 15:29 ` [PATCH v2 2/3] [gdb/python] Normalize exceptions in gdbpy_err_fetch Tom de Vries
2024-03-08 20:21 ` Tom Tromey
2024-03-09 15:11 ` Tom de Vries
2024-03-08 15:29 ` [PATCH v2 3/3] [gdb/python] Handle deprecation of PyErr_{Fetch,Restore} in 3.12 Tom de Vries
2024-03-08 20:22 ` [PATCH v2 3/3] [gdb/python] Handle deprecation of PyErr_{Fetch, Restore} " Tom Tromey
2024-03-08 20:20 ` Tom Tromey [this message]
2024-03-09 15:09 ` [PATCH v2 1/3] [gdb/python] Use gdbpy_err_fetch::{type, value} as getters 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=87v85wpjb8.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).