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 9CBEA1381F3 for ; Sun, 2 Jun 2013 07:16:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A151E087F; Sun, 2 Jun 2013 07:16:14 +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 6BCEFE07E0 for ; Sun, 2 Jun 2013 07:16:13 +0000 (UTC) Received: from localhost (178-37-163-206.adsl.inetia.pl [178.37.163.206]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 8D54B33E147; Sun, 2 Jun 2013 07:16:11 +0000 (UTC) Date: Sun, 2 Jun 2013 09:16:53 +0200 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: vapier@gentoo.org Subject: Re: [gentoo-dev] evar_push/pop helpers Message-ID: <20130602091653.2da17286@gentoo.org> In-Reply-To: <201306020309.31841.vapier@gentoo.org> References: <201306012303.21261.vapier@gentoo.org> <20130602085134.40151bd2@gentoo.org> <201306020309.31841.vapier@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.9.1 (GTK+ 2.24.18; x86_64-pc-linux-gnu) 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; micalg=PGP-SHA512; boundary="Sig_/e=dQSwlj5Wgtzsc+SUhsU4i"; protocol="application/pgp-signature" X-Archives-Salt: 08495aad-7d55-43f5-90c7-24a648a31c4d X-Archives-Hash: 509c6d3da81f135e50974409f2e8ea93 --Sig_/e=dQSwlj5Wgtzsc+SUhsU4i Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. t= his=20 > makes sure the change is actually localized to where it is needed. By use of global variables and a bunch of additional code and evals. Is: local _epatch_foo=3D${foo} local foo ... foo=3D${_epatch_foo} really that hurtful? Also, do you really want the collation to be changed only in this one place? This looks weird to me. Much like fixing tiny bug and trying to avoid checking whether anything else is affected. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/e=dQSwlj5Wgtzsc+SUhsU4i Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQJ8BAEBCgBmBQJRqvFlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKvl8P/3UDaJOvTm5OetmNsEIMQFoQ QK9aqbzwnA0RT5VZeEL0qdCZyirjJsP4pVuDcNLg2FvldplQshXkxRuB9jhpWH18 pV/ZNaEn3euiVGXHzJxMKIR+8MedrpGSanAIs05na+vBMdID8fC3jmvWtCaZGDpe m1iI2JmRKO+bi8s8NFXI/ekyCaoSUUo8t7MwAzAYsLdqVIQ6BriZb4Bx3IrFfWic 74dvyvImS4IKFzDBXW8/iFFiyLGNQdB1JEczBztOnl8Lh2ckSm8aEt/mx8Ziwa94 egd7tlEU7dNIF5+OtfD54E6t4JkkPSGJIThvtpD4v1yMivgWsP+guXmCajdFEg+6 QMJhgKqesH/+9/Kmjt8DABFBOxhHD+XmsDDLtTi5DCPNMo+nZ8WlAzgkyiRCaPsa iVulnCvbh5l3ruygVY+pEtzNSB1q9AXFX5K0jgr7XBon+dWcJUbEMXaqroLjYlI5 1+ad0j4/Xxvsq1bOuWcMoMEg1JLe+3eQ0ZTHSPcS1/Knph++z21dY58K905sb7tf aRsaLIXpQGf94JAT53oqHAQbIguwcUm09fbfZ3SRnIfDDqQ+kyHIOhKJNSh2m+gd u6XgUexcfZVvmwGOP+V4JmEbf9rl8pgZFLdoqIU318dTfR62FpiPfh/Vftxb2ULX xi2Ldny8FHnk8AQ+hjUj =IBu5 -----END PGP SIGNATURE----- --Sig_/e=dQSwlj5Wgtzsc+SUhsU4i--