From: Andreas Schwab <schwab@linux-m68k.org>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb: make gdbpy_parse_command_name return a unique_xmalloc_ptr
Date: Tue, 23 Mar 2021 19:07:06 +0100 [thread overview]
Message-ID: <87v99hn3qt.fsf@igel.home> (raw)
In-Reply-To: <20210323175546.3836508-1-simon.marchi@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Tue, 23 Mar 2021 13:55:46 -0400")
On Mär 23 2021, Simon Marchi via Gdb-patches wrote:
> @@ -545,14 +540,19 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
> /* If we have our own "invoke" method, then allow unknown
> sub-commands. */
> allow_unknown = PyObject_HasAttr (self, invoke_cst);
> - cmd = add_prefix_cmd (cmd_name, (enum command_class) cmdtype,
> + cmd = add_prefix_cmd (cmd_name.get (),
> + (enum command_class) cmdtype,
> NULL, docstring, &obj->sub_list,
> pfx_name, allow_unknown, cmd_list);
> }
> else
> - cmd = add_cmd (cmd_name, (enum command_class) cmdtype,
> + cmd = add_cmd (cmd_name.get (), (enum command_class) cmdtype,
> docstring, cmd_list);
>
> + /* The above doesn't copy nor take ownership of the name... so we just
> + leak it. */
s/leak/release/?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2021-03-23 18:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 17:55 Simon Marchi via Gdb-patches
2021-03-23 18:07 ` Andreas Schwab [this message]
2021-03-23 18:11 ` Simon Marchi via Gdb-patches
2021-03-23 18:21 ` Simon Marchi via Gdb-patches
2021-04-01 17:54 ` Tom Tromey
2021-03-23 18:38 ` [PATCH v2] " Simon Marchi via Gdb-patches
2021-04-01 17:56 ` Tom Tromey
2021-05-12 17:29 ` Simon Marchi via Gdb-patches
2021-05-12 14:12 ` Marco Barisione via Gdb-patches
2021-05-12 14:18 ` Simon Marchi via Gdb-patches
2021-05-12 17:51 ` [pushed] " Simon Marchi via Gdb-patches
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=87v99hn3qt.fsf@igel.home \
--to=schwab@linux-m68k.org \
--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