From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Removing nested functions, part one of lots
Date: Wed, 2 Jan 2013 02:02:56 +0000 [thread overview]
Message-ID: <20130102020256.GA18949@riva.dynamic.greenend.org.uk> (raw)
In-Reply-To: <20130102000504.GA5547@riva.dynamic.greenend.org.uk>
On Wed, Jan 02, 2013 at 12:05:04AM +0000, Colin Watson wrote:
> On Wed, Jan 02, 2013 at 01:37:38AM +0400, Andrey Borzenkov wrote:
> > В Tue, 1 Jan 2013 14:42:04 +0000
> > Colin Watson <cjwatson@ubuntu.com> пишет:
> > > * If a hook requires more than one local variable from its parent
> > > function, declare "struct <name-of-parent>_ctx" with the necessary
> > > variables, and convert both the hook and the parent to access the
> > > variables in question via that structure.
> >
> > Personally I find "ctx" part a bit confusing. It is not really execution
> > context in usual sense, it is just collection of random variables. I
> > would rather go with "struct <name-of-parent>_data" here.
>
> I'm fine with that (and this is exactly why I posted this for a bit of a
> bikeshedding opportunity :-) ). Vladimir, any opinions on the naming?
Actually, "*_data" is suboptimal because (particularly in filesystem
code) there are many other variables and types called "data". How about
"*_vars"? Then I can use "struct foo_vars *vars = data;" or similar as
well and it should work out reasonably well.
--
Colin Watson [cjwatson@ubuntu.com]
next prev parent reply other threads:[~2013-01-02 2:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-01 14:42 [PATCH] Removing nested functions, part one of lots Colin Watson
2013-01-01 18:31 ` Seth Goldberg
2013-01-01 19:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-01 21:14 ` Colin Watson
2013-01-01 21:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-01 21:37 ` Andrey Borzenkov
2013-01-01 22:24 ` richardvoigt
2013-01-02 0:07 ` Colin Watson
2013-01-02 0:05 ` Colin Watson
2013-01-02 2:02 ` Colin Watson [this message]
2013-01-03 17:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-03 19:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-09 20:58 ` Vladimir 'φ-coder/phcoder' Serbinenko
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=20130102020256.GA18949@riva.dynamic.greenend.org.uk \
--to=cjwatson@ubuntu.com \
--cc=grub-devel@gnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.