Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TqDgJ-0002u2-Dl for mharc-grub-devel@gnu.org; Tue, 01 Jan 2013 21:03:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqDgE-0002fn-8X for grub-devel@gnu.org; Tue, 01 Jan 2013 21:03:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqDgD-0003Wu-0G for grub-devel@gnu.org; Tue, 01 Jan 2013 21:03:42 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:47437 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqDgC-0003We-RJ for grub-devel@gnu.org; Tue, 01 Jan 2013 21:03:40 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1TqDgB-0007wG-AO for grub-devel@gnu.org; Wed, 02 Jan 2013 02:03:39 +0000 Received: from localhost ([127.0.0.1] helo=sarantium.pelham.vpn.ucam.org) by riva.pelham.vpn.ucam.org with esmtp (Exim 4.72) (envelope-from ) id 1TqDg7-0001xJ-10 for grub-devel@gnu.org; Wed, 02 Jan 2013 02:03:35 +0000 Received: from riva.dynamic.greenend.org.uk (localhost [127.0.0.1]) by sarantium.pelham.vpn.ucam.org (Postfix) with ESMTPS id 0DCDB3E5015 for ; Wed, 2 Jan 2013 02:02:58 +0000 (GMT) Date: Wed, 2 Jan 2013 02:02:56 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: Re: [PATCH] Removing nested functions, part one of lots Message-ID: <20130102020256.GA18949@riva.dynamic.greenend.org.uk> References: <20130101144204.GZ21216@riva.dynamic.greenend.org.uk> <20130102013738.0f1034cb@opensuse.site> <20130102000504.GA5547@riva.dynamic.greenend.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130102000504.GA5547@riva.dynamic.greenend.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: 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: Wed, 02 Jan 2013 02:03:45 -0000 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 necessa= ry > > > variables, and convert both the hook and the parent to access th= e > > > variables in question via that structure. > >=20 > > 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. >=20 > 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 =3D data;" or similar as well and it should work out reasonably well. --=20 Colin Watson [cjwatson@ubuntu.com]