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-50-gd88f53


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-50-gd88f532
Date: Fri, 02 Dec 2011 18:18:27 +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=d88f5323d10a09533a5b66bb8031a4e2b8e44313

The branch, stable-2.0 has been updated
       via  d88f5323d10a09533a5b66bb8031a4e2b8e44313 (commit)
      from  76f3ee77b07141b5ba5a199182d0e8118cd026d0 (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 d88f5323d10a09533a5b66bb8031a4e2b8e44313
Author: Andy Wingo <address@hidden>
Date:   Fri Dec 2 19:18:05 2011 +0100

    fix `free' of mpz_to_str
    
    * libguile/numbers.c (scm_number_to_string): Don't `free' the result of
      mpz_get_str; use the mp free function.

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

Summary of changes:
 libguile/numbers.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/libguile/numbers.c b/libguile/numbers.c
index e5b4ed9..6938381 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -5330,8 +5330,14 @@ SCM_DEFINE (scm_number_to_string, "number->string", 1, 
1, 0,
   else if (SCM_BIGP (n))
     {
       char *str = mpz_get_str (NULL, base, SCM_I_BIG_MPZ (n));
+      size_t len = strlen (str);
+      void (*freefunc) (void *, size_t);
+      SCM ret;
+      mp_get_memory_functions (NULL, NULL, &freefunc);
       scm_remember_upto_here_1 (n);
-      return scm_take_locale_string (str);
+      ret = scm_from_latin1_stringn (str, len);
+      freefunc (str, len + 1);
+      return ret;
     }
   else if (SCM_FRACTIONP (n))
     {


hooks/post-receive
-- 
GNU Guile



reply via email to

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