Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [committed][gdb/testsuite] Fix gdb.rust/traits.exp with -readnow
Date: Fri, 30 Oct 2020 12:18:28 -0600	[thread overview]
Message-ID: <87v9ertw5n.fsf@tromey.com> (raw)
In-Reply-To: <20201028200757.GA27867@delia> (Tom de Vries's message of "Wed, 28 Oct 2020 21:07:58 +0100")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> +proc readnow { args } {
Tom> +    if { [llength $args] == 1 } {
Tom> +	set re [lindex $args 0]
Tom> +    } else {
Tom> +	set re ""
Tom> +    }

It's better to use Tcl's argument-passing conventions rather than
implement it in the proc.  I know dejagnu (and thus the gdb test suite)
does this, but that's not a great example to copy.

Something like this would achieve the same effect:

proc readnow {{re ""}} {
...

Tom

      reply	other threads:[~2020-10-30 18:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 20:07 Tom de Vries
2020-10-30 18:18 ` Tom Tromey [this message]

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=87v9ertw5n.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