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

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Jan 22 06:52:22 PST 2006


Author: yamaken
Date: 2006-01-22 06:52:06 -0800 (Sun, 22 Jan 2006)
New Revision: 2970

Modified:
   branches/r5rs/sigscheme/src/syntax.c
   branches/r5rs/sigscheme/src/write.c
Log:
* sigscheme/src/write.c
  - (hash_lookup): Replace 'unsigned' with 'hashval_t' to suppress
    warning on LP64, and proper meaning

* sigscheme/src/syntax.c
  - (TR_ENDP, listran, vectran): Remove unsafe capability assumption
    between ScmObj and a C boolean expression, which cause warning on
    LP64


Modified: branches/r5rs/sigscheme/src/syntax.c
===================================================================
--- branches/r5rs/sigscheme/src/syntax.c	2006-01-22 14:18:23 UTC (rev 2969)
+++ branches/r5rs/sigscheme/src/syntax.c	2006-01-22 14:52:06 UTC (rev 2970)
@@ -229,7 +229,7 @@
 #define TR_CALL(_t, _msg, _p) ((*(_t).trans)(&(_t), (_msg), (_p)))
 #define TR_GET_OBJ(_t)     (TR_CALL((_t), TR_MSG_GET_OBJ, SCM_INVALID))
 #define TR_NEXT(_t)        ((void)TR_CALL((_t), TR_MSG_NEXT, SCM_INVALID))
-#define TR_ENDP(_t)        ((scm_bool)TR_CALL((_t), TR_MSG_ENDP, SCM_INVALID))
+#define TR_ENDP(_t)        (NFALSEP(TR_CALL((_t), TR_MSG_ENDP, SCM_INVALID)))
 #define TR_EXTRACT(_t)     (TR_CALL((_t), TR_MSG_EXTRACT, SCM_INVALID))
 
 
@@ -248,7 +248,7 @@
         break;
 
     case TR_MSG_ENDP:
-        return (ScmObj)TRL_ENDP(*t);
+        return MAKE_BOOL(TRL_ENDP(*t));
 
     case TR_MSG_GET_OBJ:
         return TRL_GET_OBJ(*t);
@@ -303,7 +303,7 @@
         TRV_NEXT(*t);
         break;
     case TR_MSG_ENDP:
-        return (ScmObj)TRV_ENDP(*t);
+        return MAKE_BOOL(TRV_ENDP(*t));
 
     case TR_MSG_SPLICE:
         splice_len = scm_length(obj);

Modified: branches/r5rs/sigscheme/src/write.c
===================================================================
--- branches/r5rs/sigscheme/src/write.c	2006-01-22 14:18:23 UTC (rev 2969)
+++ branches/r5rs/sigscheme/src/write.c	2006-01-22 14:52:06 UTC (rev 2970)
@@ -536,7 +536,7 @@
 hash_lookup(hash_table *tab, ScmObj key, int datum, int flag)
 {
     size_t i;
-    unsigned hashval;
+    hashval_t hashval;
     hash_entry *ent;
 
     /* If we have > 32 bits, we'll discard some of them.  The lower
@@ -545,7 +545,7 @@
      * vector.  We'll drop these bits.  KEYs are expected to be
      * pointers into the heap, so their higher bis are probably
      * uniform.  I haven't confirmed either's validity, though. */
-    hashval = (unsigned)key;
+    hashval = (hashval_t)key;
     if (sizeof(hashval) > 4) {
         hashval /= sizeof(ScmCell);
         hashval &= 0xffffffff;



More information about the uim-commit mailing list