bug-gnulib
[Top][All Lists]
Advanced

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

Re: yesno module and i18n


From: Eric Blake
Subject: Re: yesno module and i18n
Date: Sat, 18 Aug 2007 13:56:34 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 8/18/2007 1:25 PM:
> Eric Blake wrote:
>>> +       translated_pattern = nl_langinfo (nl_index);
>> Not reliable.  nl_langinfo is entitled to use static storage that can be
>> overwritten by later calls to nl_langinfo or by subsequent changes to the
>> locale.  You will need to do something like strdup to avoid problems with
>> nl_langinfo's storage; then properly clean up to avoid memory leaks.
> 
> Oh, indeed. How about this?
> 
> 2007-08-18  Bruno Haible  <address@hidden>
> 
>       * lib/rpmatch.c: Include langinfo.h.
>       (N_): New macro.
>       (try): Copy the pattern into safe memory before caching it.
>       (localized_pattern): New function/macro.
>       (rpmatch): Use it. Add translator comments.
>       * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Test for nl_langinfo and YESEXPR.
>       Suggested by Eric Blake.

Looks good to me.  Go ahead and install it.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGx07t84KuGfSFAYARAuY4AJ9SjzQUj2Stn4cAAGN/mDqMgmM7CQCeLLmm
z16dbjoEW1SM8f1eoAdZzHk=
=9zyV
-----END PGP SIGNATURE-----




reply via email to

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