Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Python pretty-printing [3/6]
Date: Tue, 07 Apr 2009 01:16:00 -0000	[thread overview]
Message-ID: <20090407011627.GA13882@caradoc.them.org> (raw)
In-Reply-To: <m3eiw52wkx.fsf@fleche.redhat.com>

On Mon, Apr 06, 2009 at 05:26:06PM -0600, Tom Tromey wrote:
> Daniel> So the constructor does a lookup.  This will be a little weird if we
> Daniel> want to create types from scratch someday (could be very useful).
> 
> At that point we can always make the constructor change its behavior
> depending on the runtime type of the argument.
> 
> t = Type(gdb.STRUCT)  # make a new struct, STRUCT is an int
> t = Type("whatever")  # look up "whatever"

OK, that makes sense.

> Daniel> And what happens if name is not given?
> 
> This is some relic or misconception in the code... the name need not
> be optional.

Let's fix the docs then.

> Daniel> Anyway, I wonder if there shouldn't be an explicit lookup
> Daniel> routine instead.
> 
> I like it ok the way it is.  But, if you really want it changed, I
> will do that; now is not a super time to do this, but it will only be
> harder in the future.  Thiago, what do you think?

Especially if we have to make other incompatible changes now anyway, I'd rather
have a lookup routine for this than a constructor.  But I don't want
to just make work for you.

At some point I know we'll want explicit lookup routines; there's
scope to consider.

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2009-04-07  1:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02 20:55 Tom Tromey
2009-04-03 15:16 ` Eli Zaretskii
2009-04-07 19:52   ` Tom Tromey
2009-04-07 21:45     ` Eli Zaretskii
2009-04-03 16:30 ` Daniel Jacobowitz
2009-04-06 23:26   ` Tom Tromey
2009-04-07  0:34     ` Thiago Jung Bauermann
2009-04-07  1:16     ` Daniel Jacobowitz [this message]
2009-04-07  2:03       ` Thiago Jung Bauermann
2009-04-07  2:27         ` Daniel Jacobowitz
2009-04-03 20:34 ` Thiago Jung Bauermann
2009-04-06 23:32   ` Tom Tromey
2009-04-08 18:26   ` Tom Tromey
2009-04-08 18:39 ` Tom Tromey
2009-04-08 19:23   ` Eli Zaretskii
2009-04-09  1:16     ` Tom Tromey

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=20090407011627.GA13882@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --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