From 1445e4492fd0a6a19f39625d3bfe2f78c33fda9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 4 Oct 2007 16:22:05 +0000 Subject: [PATCH] Changes from arch/CVS synchronization --- libguile/ChangeLog | 10 ++++++++++ libguile/i18n.c | 8 +++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index f3dd1c5f7..35479f98b 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,13 @@ +2007-10-04 Ludovic Courtès + + * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call + `leave_locale_section ()' on failure of + `enter_locale_section ()' since the mutex is not held and locale + settings are unchanged. + (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use + `restore_locale_settings ()' instead of `leave_locale_section ()' + since the mutex is not held. + 2007-10-02 Ludovic Courtès * threads.c (on_thread_exit): Don't call `scm_leave_guile ()' diff --git a/libguile/i18n.c b/libguile/i18n.c index 88652efd2..43381f4ed 100644 --- a/libguile/i18n.c +++ b/libguile/i18n.c @@ -685,12 +685,14 @@ SCM_DEFINE (scm_make_locale, "make-locale", 2, 1, 0, scm_t_locale_settings prev_locale; err = enter_locale_section (c_locale, &prev_locale); - leave_locale_section (&prev_locale); if (err) goto fail; else - SCM_NEWSMOB (locale, scm_tc16_locale_smob_type, c_locale); + { + leave_locale_section (&prev_locale); + SCM_NEWSMOB (locale, scm_tc16_locale_smob_type, c_locale); + } } #endif @@ -1410,7 +1412,7 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinfo", 1, 1, 0, { c_result = nl_langinfo (c_item); - leave_locale_section (&lsec_prev_locale); + restore_locale_settings (&lsec_prev_locale); free_locale_settings (&lsec_prev_locale); } #endif