unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: A minor fix in nl-langinfo
Date: Tue, 12 Aug 2014 17:34:10 -0400	[thread overview]
Message-ID: <8761hxbdf1.fsf@yeeloong.lan> (raw)
In-Reply-To: <87ppg5for4.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 12 Aug 2014 22:15:43 +0200")

ludo@gnu.org (Ludovic Courtès) writes:

> Eli Zaretskii <eliz@gnu.org> 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 = nl_langinfo_l (c_item, c_locale);
>> +      if (c_result != NULL)
>> +	c_result = strdup (c_result);
>>        codeset = 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 = nl_langinfo (c_item);
>> +	  if (c_result != NULL)
>> +	    c_result = strdup (c_result);
>>            codeset = nl_langinfo (CODESET);
>>  
>>  	  restore_locale_settings (&lsec_prev_locale);
>> @@ -1532,12 +1536,11 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf
>>    else
>>      {
>>        c_result = nl_langinfo (c_item);
>> +      if (c_result != NULL)
>> +	c_result = strdup (c_result);
>>        codeset = nl_langinfo (CODESET);
>>      }
>>  
>> -  if (c_result != NULL)
>> -    c_result = strdup (c_result);
>> -
>>    unlock_locale_mutex ();
>>  
>>    if (c_result == NULL)
>
> Makes sense, please push.

Actually, please hold off on this.  It doesn't entirely fix the
problems, and I'm working on a more complete fix.

      Thanks,
        Mark



  reply	other threads:[~2014-08-12 21:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-09 14:19 A minor fix in nl-langinfo Eli Zaretskii
2014-08-10 14:22 ` Eli Zaretskii
2014-08-12 20:15   ` Ludovic Courtès
2014-08-12 21:34     ` Mark H Weaver [this message]
2014-08-13 17:22       ` Mark H Weaver
2014-08-13 19:35         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761hxbdf1.fsf@yeeloong.lan \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).