guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-130-g94a75


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-130-g94a751b
Date: Mon, 09 Jan 2012 20:24:04 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=94a751bdccbeaeba9f871d36c085f21b90ac3a84

The branch, stable-2.0 has been updated
       via  94a751bdccbeaeba9f871d36c085f21b90ac3a84 (commit)
       via  17cdda21810939443f29362355a334b6d2f174cf (commit)
       via  002aab40bc19d5a4c7408b8d49658b438c8b59e0 (commit)
      from  ff1feca9bd6d23b248f4e3eb768a08f7c3aabc1d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 94a751bdccbeaeba9f871d36c085f21b90ac3a84
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jan 9 21:23:07 2012 +0100

    i18n: Fix gc_malloc/free mismatch on non-GNU systems.
    
    * libguile/i18n.c (scm_i_locale_free): Remove.
      (smob_locale_free): Define only when USE_GNU_LOCALE_API.
      (scm_make_locale)[!USE_GNU_LOCALE_API]: Allocate
      `c_locale->locale_name' with `scm_gc_strdup', not `malloc'.

commit 17cdda21810939443f29362355a334b6d2f174cf
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jan 9 21:20:21 2012 +0100

    i18n: Disable Turkish locale tests on FreeBSD 8.
    
    * test-suite/tests/i18n.test (under-turkish-utf8-locale-or-unresolved):
      Check %HOST-TYPE and throw `unresolved' on FreeBSD 8.

commit 002aab40bc19d5a4c7408b8d49658b438c8b59e0
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jan 9 01:16:16 2012 +0100

    Fix loose typing in `test-scm-spawn-thread.c'.
    
    * test-suite/standalone/test-scm-spawn-thread.c (inner_main): Use
      `SCM2PTR' instead of a cast.

-----------------------------------------------------------------------

Summary of changes:
 libguile/i18n.c                               |   22 ++++++++--------------
 test-suite/standalone/test-scm-spawn-thread.c |    4 ++--
 test-suite/tests/i18n.test                    |    8 ++++++--
 3 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/libguile/i18n.c b/libguile/i18n.c
index c0deb98..f833e5d 100644
--- a/libguile/i18n.c
+++ b/libguile/i18n.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 
Inc.
+/* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software 
Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -196,22 +196,11 @@ typedef struct scm_locale
   int   category_mask;
 } *scm_t_locale;
 
-
-/* Free the resources used by LOCALE.  */
-static inline void
-scm_i_locale_free (scm_t_locale locale)
-{
-  free (locale->locale_name);
-  locale->locale_name = NULL;
-}
-
 #else /* USE_GNU_LOCALE_API */
 
 /* Alias for glibc's locale type.  */
 typedef locale_t scm_t_locale;
 
-#define scm_i_locale_free freelocale
-
 #endif /* USE_GNU_LOCALE_API */
 
 
@@ -244,16 +233,20 @@ SCM_GLOBAL_VARIABLE (scm_global_locale, "%global-locale");
 
 SCM_SMOB (scm_tc16_locale_smob_type, "locale", 0);
 
+#ifdef USE_GNU_LOCALE_API
+
 SCM_SMOB_FREE (scm_tc16_locale_smob_type, smob_locale_free, locale)
 {
   scm_t_locale c_locale;
 
   c_locale = (scm_t_locale) SCM_SMOB_DATA (locale);
-  scm_i_locale_free (c_locale);
+  freelocale (c_locale);
 
   return 0;
 }
 
+#endif /* USE_GNU_LOCALE_API */
+
 
 static void inline scm_locale_error (const char *, int) SCM_NORETURN;
 
@@ -667,7 +660,8 @@ SCM_DEFINE (scm_make_locale, "make-locale", 2, 1, 0,
   c_locale = scm_gc_malloc (sizeof (* c_locale), "locale");
 
   c_locale->category_mask = c_category_mask;
-  c_locale->locale_name = c_locale_name;
+  c_locale->locale_name = scm_gc_strdup (c_locale_name, "locale");
+  free (c_locale_name);
 
   if (scm_is_eq (base_locale, SCM_VARIABLE_REF (scm_global_locale)))
     {
diff --git a/test-suite/standalone/test-scm-spawn-thread.c 
b/test-suite/standalone/test-scm-spawn-thread.c
index b632ab0..f6d561a 100644
--- a/test-suite/standalone/test-scm-spawn-thread.c
+++ b/test-suite/standalone/test-scm-spawn-thread.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -48,7 +48,7 @@ inner_main (void *data)
 
   thread = scm_spawn_thread (thread_main, 0, thread_handler, 0);
   timeout = scm_from_unsigned_integer (time (NULL) + 10);
-  return (void *) scm_join_thread_timed (thread, timeout, SCM_BOOL_F);
+  return SCM2PTR (scm_join_thread_timed (thread, timeout, SCM_BOOL_F));
 }
 
 
diff --git a/test-suite/tests/i18n.test b/test-suite/tests/i18n.test
index a5e418f..0567051 100644
--- a/test-suite/tests/i18n.test
+++ b/test-suite/tests/i18n.test
@@ -1,6 +1,6 @@
 ;;;; i18n.test --- Exercise the i18n API.  -*- coding: utf-8; mode: scheme; -*-
 ;;;;
-;;;; Copyright (C) 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+;;;; Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Free Software 
Foundation, Inc.
 ;;;; Ludovic Courtès
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
@@ -138,7 +138,11 @@
   (under-locale-or-unresolved %french-utf8-locale thunk))
 
 (define (under-turkish-utf8-locale-or-unresolved thunk)
-  (under-locale-or-unresolved %turkish-utf8-locale thunk))
+  ;; FreeBSD 8.2 has a broken tr_TR locale where `i' is mapped to
+  ;; uppercase `I' instead of `Ä°', so disable tests on that platform.
+  (if (string-contains %host-type "freebsd8")
+      (throw 'unresolved)
+      (under-locale-or-unresolved %turkish-utf8-locale thunk)))
 
 (define (under-german-utf8-locale-or-unresolved thunk)
   (under-locale-or-unresolved %german-utf8-locale thunk))


hooks/post-receive
-- 
GNU Guile



reply via email to

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