From: Phil Muldoon <pmuldoon@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [python] [patch] PR python/12656 (API for special blocks)
Date: Mon, 10 Oct 2011 09:34:00 -0000 [thread overview]
Message-ID: <m34nzhchro.fsf@redhat.com> (raw)
In-Reply-To: <m3liswcz63.fsf@fleche.redhat.com> (Tom Tromey's message of "Fri, 07 Oct 2011 14:41:24 -0600")
Tom Tromey <tromey@redhat.com> writes:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
> Phil> +@defun Block.is_global ()
> Phil> +@defun Block.is_static ()
>
> Why are these methods rather than attributes?
Because is_valid is a method in py-block.c, and I decided to continue
the is_* APIs to be methods. It confuses my *why* is_valid is a method
over an attribute, too. I guess we missed this when we ported it over
from archer (several other classes, too). I thought about changing
is_valid, but this would be an API break.
> Phil> - struct blpy_block_object *source;
> Phil> + const struct blpy_block_object *source;
>
> Why make this one const?
> It seems wrong given that we have to decref it when the iterator is
> destroyed.
Gratuitous on my part, apologies.
> Phil> + Py_INCREF (Py_None);
> Phil> + return Py_None;
>
> I think it is more normal to use Py_RETURN_NONE here.
Thanks.
> Phil> gdb_test "python print block_iter.is_valid()" "False" \
> Phil> "Check block validity"
> Phil> +
>
> Gratuitous newline addition.
>
> Phil> -extern struct value *value_of_variable (struct symbol *var, struct block *b);
> Phil> +extern struct value *value_of_variable (struct symbol *var, const struct block *b);
>
> This should probably wrap after the ",".
Thanks. I've modified the patch accordingly, but as these are trivial
changes I won't resubmit it until we reach a conclusion on the is_*
question (and we need a doc review, anyway).
Cheers,
Phil
next prev parent reply other threads:[~2011-10-10 9:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 17:02 Phil Muldoon
2011-10-07 20:41 ` Tom Tromey
2011-10-10 9:34 ` Phil Muldoon [this message]
2011-10-10 18:27 ` Tom Tromey
2011-10-11 16:00 ` Phil Muldoon
[not found] ` <09787EF419216C41A903FD14EE5506DD030BEC56DF@AUSX7MCPC103.AMER.DELL.COM>
2011-10-11 16:06 ` Paul Koning
2011-10-11 18:32 ` Phil Muldoon
2011-10-11 17:30 ` Tom Tromey
2011-10-17 10:59 ` Phil Muldoon
2011-10-17 11:57 ` Eli Zaretskii
2011-10-17 12:49 ` Phil Muldoon
2011-10-17 15:07 ` Eli Zaretskii
2011-10-20 12:58 ` 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=m34nzhchro.fsf@redhat.com \
--to=pmuldoon@redhat.com \
--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