From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TqoTm-0000Ny-3l for mharc-grub-devel@gnu.org; Thu, 03 Jan 2013 12:21:18 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoTh-0000Lf-Io for grub-devel@gnu.org; Thu, 03 Jan 2013 12:21:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqoTg-0005lp-FL for grub-devel@gnu.org; Thu, 03 Jan 2013 12:21:13 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:46193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoTg-0005li-9E for grub-devel@gnu.org; Thu, 03 Jan 2013 12:21:12 -0500 Received: by mail-ea0-f173.google.com with SMTP id i13so6549428eaa.32 for ; Thu, 03 Jan 2013 09:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=aSHP8IIbX1FKAlcJDFMULj3rIivUg6W9VKoDSpzKCnU=; b=FAdaLLzz+aD5kk9tNiIKbb79p5hSaIAqSKbO0iEp+ciurnHfi/YfJqHQ2KW8ZErnud HUIRiVSmStsfOMtPf2iD1nZir2fqIL165dhuN10FchTEc6TCWGV2CFP4Fh3GBsVj9Hm+ M8GMb/kXUc6pgvxJ6/mf91FBYVKYxO89JKTf6/f6enXPi1OaNGiuZ4dw3GidZPfDqSfg XXNoLiVIYJwWP/L1qrwef3hG9eIrGr+SUpU7YGmNqeBzP9xCl/rKmttC68ruIX9clBOL EtWlcTIIkT3rE+XChjZVgBJx7PgLa00j67Jz5ZvhsuHtK8nvVYp0vz34VlBkuKIq9ohj zlgw== X-Received: by 10.14.202.3 with SMTP id c3mr136101821eeo.4.1357233670271; Thu, 03 Jan 2013 09:21:10 -0800 (PST) Received: from debian.x201.phnet (229-81.78-83.cust.bluewin.ch. [83.78.81.229]) by mx.google.com with ESMTPS id q44sm105130894eep.5.2013.01.03.09.21.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Jan 2013 09:21:09 -0800 (PST) Message-ID: <50E5BE03.6020507@gmail.com> Date: Thu, 03 Jan 2013 18:21:07 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] Removing nested functions, part one of lots References: <20130101144204.GZ21216@riva.dynamic.greenend.org.uk> <20130102013738.0f1034cb@opensuse.site> <20130102000504.GA5547@riva.dynamic.greenend.org.uk> <20130102020256.GA18949@riva.dynamic.greenend.org.uk> In-Reply-To: <20130102020256.GA18949@riva.dynamic.greenend.org.uk> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig5DC6D90773199A0961FFCEEC" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.215.173 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2013 17:21:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5DC6D90773199A0961FFCEEC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02.01.2013 03:02, Colin Watson wrote: > 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: >>> =D0=92 Tue, 1 Jan 2013 14:42:04 +0000 >>> Colin Watson =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>>> * If a hook requires more than one local variable from its parent >>>> function, declare "struct _ctx" with the necessar= y >>>> 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 execut= ion >>> context in usual sense, it is just collection of random variables. I >>> would rather go with "struct _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?= >=20 > Actually, "*_data" is suboptimal because (particularly in filesystem > code) there are many other variables and types called "data". How abou= t > "*_vars"? Then I can use "struct foo_vars *vars =3D data;" or similar = as > well and it should work out reasonably well. >=20 I feel like "_ctx" is a good one. It is the executional context, it's just trimmed to what we really need. --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig5DC6D90773199A0961FFCEEC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlDlvgMACgkQNak7dOguQgkTnwD+PGDmk0aZ95UWyE/jgHZDE28L qQjtWranieQU/memrMsA/0GPNuN2ojb9BxiSqaOWkijTkbNOjgaolgououD+JxKs =/w9A -----END PGP SIGNATURE----- --------------enig5DC6D90773199A0961FFCEEC--