mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +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:
parent
d7a2207326
commit
12f0c3e547
1 changed files with 9 additions and 13 deletions
|
@ -512,16 +512,12 @@ get_current_locale (SCM *result)
|
||||||
#define RUN_IN_LOCALE_SECTION(_c_locale, _statement) \
|
#define RUN_IN_LOCALE_SECTION(_c_locale, _statement) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
scm_t_locale old_loc = uselocale (NULL); \
|
scm_t_locale old_loc; \
|
||||||
if (old_loc != _c_locale) \
|
\
|
||||||
{ \
|
old_loc = uselocale (_c_locale); \
|
||||||
uselocale (_c_locale); \
|
|
||||||
_statement ; \
|
_statement ; \
|
||||||
uselocale (old_loc); \
|
uselocale (old_loc); \
|
||||||
} \
|
} \
|
||||||
else \
|
|
||||||
_statement; \
|
|
||||||
} \
|
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue