[uim-commit] r2959 - branches/r5rs/sigscheme/src

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Jan 20 20:04:40 PST 2006


Author: yamaken
Date: 2006-01-20 20:04:34 -0800 (Fri, 20 Jan 2006)
New Revision: 2959

Modified:
   branches/r5rs/sigscheme/src/operations.c
Log:
* sigscheme/src/operations.c
  - (scm_p_number2string): Fix broken 64-bit handling


Modified: branches/r5rs/sigscheme/src/operations.c
===================================================================
--- branches/r5rs/sigscheme/src/operations.c	2006-01-21 03:43:10 UTC (rev 2958)
+++ branches/r5rs/sigscheme/src/operations.c	2006-01-21 04:04:34 UTC (rev 2959)
@@ -567,7 +567,7 @@
 ScmObj
 scm_p_number2string(ScmObj num, ScmObj args)
 {
-  char buf[sizeof(int) * CHAR_BIT + sizeof("")];
+  char buf[sizeof(scm_int_t) * CHAR_BIT + sizeof("")];
   char *p;
   const char *end;
   scm_int_t n, digit;
@@ -579,7 +579,7 @@
 
   n = SCM_INT_VALUE(num);
   neg = (n < 0);
-  n = abs(n);
+  n = (neg) ? -n : n;
   r = prepare_radix(SCM_MANGLE(name), args);
 
   end = p = &buf[sizeof(buf) - 1];



More information about the uim-commit mailing list