Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [python][patch] And range method to type
Date: Fri, 04 Dec 2009 18:13:00 -0000	[thread overview]
Message-ID: <m34oo6fw0h.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4B1929DC.7070809@redhat.com> (Phil Muldoon's message of "Fri, 04 	Dec 2009 15:25:16 +0000")

>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:

Phil> This patch adds a "range" method for GDB.Types.  It only supports types
Phil> that support a range, or the range type itself.

Phil> +  if (TYPE_CODE (type) != TYPE_CODE_ARRAY &&
Phil> +      TYPE_CODE (type) != TYPE_CODE_STRING &&
Phil> +      TYPE_CODE (type) != TYPE_CODE_RANGE)

In the GNU style, the "&&"s go at the start of the line.

I think this code should check for failures from PyLong_FromLong and
PyTuple_SetItem.  I realize that is a pain, but if one of those does
fail, a failure to check will yield weird problems.

Phil>  Return a type of pointer to this type." },
Phil> +  { "range", typy_range, METH_NOARGS,
Phil> +    "range () -> Tuple\n\

It should be "tuple", as that is the name of the returned type.

Tom


  parent reply	other threads:[~2009-12-04 18:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 15:25 Phil Muldoon
2009-12-04 15:32 ` Eli Zaretskii
2009-12-04 17:10   ` Phil Muldoon
2009-12-04 19:30     ` Eli Zaretskii
2009-12-04 17:19 ` Joel Brobecker
2009-12-04 18:13 ` Tom Tromey [this message]
2009-12-05  9:19   ` Phil Muldoon
2009-12-05  9:22     ` Eli Zaretskii
2009-12-07 19:54     ` Tom Tromey
2009-12-08 14:14       ` Phil Muldoon
2009-12-09  3:00         ` Hui Zhu
2009-12-09  7:47           ` Phil Muldoon
2009-12-09 11:27             ` Eli Zaretskii
2009-12-09 11:41               ` Andreas Schwab
2009-12-09  7:52           ` Phil Muldoon
2009-12-09  7:56             ` Hui Zhu

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=m34oo6fw0h.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    /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