Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: <Paul_Koning@Dell.com>
To: <tromey@redhat.com>
Cc: <pmuldoon@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [patch] [python] PR python/15461 (gate architecture calls)
Date: Wed, 28 Aug 2013 18:14:00 -0000	[thread overview]
Message-ID: <C75A84166056C94F84D238A44AF9F6AD034CBA4D@AUSX10MPC103.AMER.DELL.COM> (raw)
In-Reply-To: <87d2oxvgye.fsf@fleche.redhat.com>


On Aug 28, 2013, at 1:54 PM, Tom Tromey <tromey@redhat.com> wrote:

> Phil> Something I thought about is not allowing gdb.Architecture to be
> Phil> instantiated directly, but I could not think of a clean way to do
> Phil> this.
> 
> Did you think of any way?
> It seems like a good thing to prevent.

Ditto for all the existing types for which direct instantiation doesn't do anything useful.

I haven't tried this, but judging from the Python docs, if you point the tp_new field of the type object to a function that sets a suitable Python exception, that should do the job.

	paul


  reply	other threads:[~2013-08-28 18:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28 12:04 Phil Muldoon
2013-08-28 14:52 ` Tom Tromey
2013-08-28 15:15   ` Phil Muldoon
2013-08-28 15:54     ` Tom Tromey
2013-08-29 11:15       ` Phil Muldoon
2013-08-29 14:58         ` Tom Tromey
2013-08-30 10:13           ` Phil Muldoon
2013-08-28 17:54 ` Tom Tromey
2013-08-28 18:14   ` Paul_Koning [this message]
2013-08-28 18:45     ` Phil Muldoon

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=C75A84166056C94F84D238A44AF9F6AD034CBA4D@AUSX10MPC103.AMER.DELL.COM \
    --to=paul_koning@dell.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=tromey@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