guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A minor fix in nl-langinfo


From: Mark H Weaver
Subject: Re: A minor fix in nl-langinfo
Date: Tue, 12 Aug 2014 17:34:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Eli Zaretskii <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]