From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 98CA61381F3 for ; Sun, 2 Jun 2013 15:40:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B174E0A7C; Sun, 2 Jun 2013 15:40:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 317F2E07E8 for ; Sun, 2 Jun 2013 15:40:45 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 4A71833DF72; Sun, 2 Jun 2013 15:40:44 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: =?utf-8?q?Micha=C5=82_G=C3=B3rny?= Subject: Re: [gentoo-dev] evar_push/pop helpers Date: Sun, 2 Jun 2013 11:40:45 -0400 User-Agent: KMail/1.13.7 (Linux/3.8.3; KDE/4.6.5; x86_64; ; ) Cc: gentoo-dev@lists.gentoo.org References: <201306012303.21261.vapier@gentoo.org> <201306020329.34579.vapier@gentoo.org> <20130602103932.759bee82@gentoo.org> In-Reply-To: <20130602103932.759bee82@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3353957.uMILbWd36u"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201306021140.46386.vapier@gentoo.org> X-Archives-Salt: 90757eff-4ac1-4714-baec-6303ad659d43 X-Archives-Hash: 03835ba484bf807ef1f1ab0f03ef1b74 --nextPart3353957.uMILbWd36u Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sunday 02 June 2013 04:39:32 Micha=C5=82 G=C3=B3rny wrote: > Dnia 2013-06-02, o godz. 03:29:33 Mike Frysinger napisa=C5=82(a): > > On Sunday 02 June 2013 03:16:53 Micha=C5=82 G=C3=B3rny wrote: > > > Dnia 2013-06-02, o godz. 03:09:31 Mike Frysinger napisa=C5=82(a): > > > > On Sunday 02 June 2013 02:51:34 Micha=C5=82 G=C3=B3rny wrote: > > > > > Dnia 2013-06-01, o godz. 23:03:20 Mike Frysinger napisa=C5=82(a): > > > > > > simple set of helpers to save/restore a variable in a limited > > > > > > section of code > > > > > >=20 > > > > > > you can see an example of it in action at the end of the file > > > > > > where i need to tweak epatch (and no, doing `LC_COLLATE=3DC set= -- > > > > > > ....` does not work). > > > > >=20 > > > > > Why the ugly hackery instead of proper 'local' scope? > > > >=20 > > > > there's no way to undo the local thus it affects the rest of the > > > > func. this makes sure the change is actually localized to where it > > > > is needed. > > >=20 > > > By use of global variables and a bunch of additional code and evals. > >=20 > > the implementation details of estack_* doesn't matter >=20 > It's not beautiful language with proper local scopes, so it *does* > matter. then go ahead and propose something different. otherwise you're pointlessl= y=20 twisting in the wind. > > > Also, do you really want the collation to be changed only in this one > > > place? This looks weird to me. > >=20 > > yes, i only want to force it here, because it's the only place where > > collation matters in the func currently. >=20 > So, effectively, changing it once in the beginning of the function > would be simpler and wouldn't cost anything. most likely, *today*, yes. in the future, who knows. but since this is th= e=20 only place in the func where we need to force a specific sorting, it makes= =20 sense to localize the change to that. i snipped the rest of your e-mail because it wasn't worth responding to =2Dmike --nextPart3353957.uMILbWd36u Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJRq2d+AAoJEEFjO5/oN/WBLzMQANz9rrKWKtodqCldi3OjKfmk BTiWTVQMAFkr02ByjXiwyR8+lS2okZRU4JdqBzYOUrGCSOZ02tRz/ix4L4quhZGb k+fZX4wLurJVMoEvYeU7c6fq0UtgcWr+vMfrWWx5Etl0f2XncnlDssNPHWUr38rF UHErnOLSUUqWB+jFs2p8v4YJxrnJy8dW/COxqGZZU/R9mJJ49Uka/3dD1C/eeFOA ttbbvAZje+ThCATb+Wan8VB2MstuR2cpdl20VOo9vrQA1mpC8nfy8yOiXfAtD9mr Ta1ZQiIPb7Cg0z2OY/X/8/s8hiubKDeiK8+tB7oZGRGpGt6R1Lv02WStertmRpZo kpvl1XU5TTC62C2uuX7e6itkVJ/eI4SRlzS1t+aDkj3ll8M+wyfZNwxCXUdg+eoj ET1NZq1yhXewoymPpunhqs8aWJa+4/BJoE9srxpGMu8mBity0HGiBWzS5Ifp6Wg5 pV3nnj2sW5LlNaNH7CD8dCjBfsErjxRwwsq0p0QRSoIOjBHAwU0DZu9Co+4ygXpK HZWsx54ONYs4k+wumdXavTlpXxIIFOCdSOB6QIZGi0DZC+531OHtng07LF3ZxXhf CtH5WR+VnZKKCvfjINAUDxdOQSq125kTyKjDpSrI4kXozNGfGtib81ZTRJuBWnCn 6tg/8tDIfto1CuTysvjJ =uNvq -----END PGP SIGNATURE----- --nextPart3353957.uMILbWd36u--