From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: A minor fix in nl-langinfo Date: Tue, 12 Aug 2014 22:15:43 +0200 Message-ID: <87ppg5for4.fsf@gnu.org> References: <83mwbdlp9k.fsf@gnu.org> <83wqagjufo.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1407874615 14502 80.91.229.3 (12 Aug 2014 20:16:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2014 20:16:55 +0000 (UTC) Cc: guile-devel To: Eli Zaretskii Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 12 22:16:48 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XHIUu-0006ch-JU for guile-devel@m.gmane.org; Tue, 12 Aug 2014 22:16:44 +0200 Original-Received: from localhost ([::1]:43886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHIUu-0001bu-4u for guile-devel@m.gmane.org; Tue, 12 Aug 2014 16:16:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHIU8-0000xH-Jz for guile-devel@gnu.org; Tue, 12 Aug 2014 16:16:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHIU3-0000wn-79 for guile-devel@gnu.org; Tue, 12 Aug 2014 16:15:56 -0400 Original-Received: from hera.aquilenet.fr ([2a01:474::1]:60407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHITx-0000n4-4V; Tue, 12 Aug 2014 16:15:45 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 7131737D1; Tue, 12 Aug 2014 22:15:44 +0200 (CEST) Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E7jFSe9dIz-w; Tue, 12 Aug 2014 22:15:44 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1523337C6; Tue, 12 Aug 2014 22:15:44 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Thermidor an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <83wqagjufo.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Aug 2014 17:22:35 +0300") User-Agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:474::1 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17326 Archived-At: Eli Zaretskii skribis: > Sorry, that missed one more instance. Please use this patch instead. > > --- libguile/i18n.c~0 2014-08-08 17:05:57.262034100 +0300 > +++ libguile/i18n.c 2014-08-10 17:20:52.073000000 +0300 > @@ -1497,6 +1497,8 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf > { > #ifdef USE_GNU_LOCALE_API > c_result =3D nl_langinfo_l (c_item, c_locale); > + if (c_result !=3D NULL) > + c_result =3D strdup (c_result); > codeset =3D nl_langinfo_l (CODESET, c_locale); > #else /* !USE_GNU_LOCALE_API */ > /* We can't use `RUN_IN_LOCALE_SECTION ()' here because the locale > @@ -1522,6 +1524,8 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf > else > { > c_result =3D nl_langinfo (c_item); > + if (c_result !=3D NULL) > + c_result =3D strdup (c_result); > codeset =3D nl_langinfo (CODESET); >=20=20 > restore_locale_settings (&lsec_prev_locale); > @@ -1532,12 +1536,11 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf > else > { > c_result =3D nl_langinfo (c_item); > + if (c_result !=3D NULL) > + c_result =3D strdup (c_result); > codeset =3D nl_langinfo (CODESET); > } >=20=20 > - if (c_result !=3D NULL) > - c_result =3D strdup (c_result); > - > unlock_locale_mutex (); >=20=20 > if (c_result =3D=3D NULL) Makes sense, please push. Thanks, Ludo=E2=80=99.