1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

i18n: Simplify `RUN_IN_LOCALE_SECTION' (GNU version).

* libguile/i18n.c (RUN_IN_LOCALE_SECTION)[USE_GNU_LOCALE_API]: Remove
  extraneous uselocale(3) call.
This commit is contained in:
Ludovic Courtès 2009-09-18 12:15:26 +02:00
parent d7a2207326
commit 12f0c3e547

View file

@ -509,19 +509,15 @@ get_current_locale (SCM *result)
#else /* USE_GNU_LOCALE_API */
/* Convenient macro to run STATEMENT in the locale context of C_LOCALE. */
#define RUN_IN_LOCALE_SECTION(_c_locale, _statement) \
do \
{ \
scm_t_locale old_loc = uselocale (NULL); \
if (old_loc != _c_locale) \
{ \
uselocale (_c_locale); \
_statement ; \
uselocale (old_loc); \
} \
else \
_statement; \
} \
#define RUN_IN_LOCALE_SECTION(_c_locale, _statement) \
do \
{ \
scm_t_locale old_loc; \
\
old_loc = uselocale (_c_locale); \
_statement ; \
uselocale (old_loc); \
} \
while (0)