[uim-commit] r2795 - branches/r5rs/sigscheme

yamaken at freedesktop.org yamaken at freedesktop.org
Wed Jan 4 17:47:19 PST 2006


Author: yamaken
Date: 2006-01-04 17:47:07 -0800 (Wed, 04 Jan 2006)
New Revision: 2795

Modified:
   branches/r5rs/sigscheme/storage-fatty.h
Log:
* sigscheme/storage-fatty.h
  - Include stdint.h
  - (SCM_SAL_STRING_STR, SCM_SAL_STRING_SET_STR,
    SCM_STRING_MUTABILITY, SCM_SAL_STRING_SET_MUTABLE,
    SCM_SAL_STRING_SET_IMMUTABLE): Replace unsigned long with
    uintptr_t to indicate its intention


Modified: branches/r5rs/sigscheme/storage-fatty.h
===================================================================
--- branches/r5rs/sigscheme/storage-fatty.h	2006-01-05 01:37:51 UTC (rev 2794)
+++ branches/r5rs/sigscheme/storage-fatty.h	2006-01-05 01:47:07 UTC (rev 2795)
@@ -43,6 +43,7 @@
    System Include
 =======================================*/
 #include <stddef.h>
+#include <stdint.h> /* FIXME: make C99-independent */
 
 /*=======================================
    Local Include
@@ -234,24 +235,24 @@
 #define SCM_SAL_STRINGP(o)             (SCM_TYPE(o) == ScmString)
 #define SCM_SAL_ENTYPE_STRING(o)       (SCM_ENTYPE((o), ScmString))
 #define SCM_SAL_STRING_STR(o)                                                \
-    ((char *)((unsigned long)SCM_AS_STRING(o)->obj.string.str                \
+    ((char *)((uintptr_t)SCM_AS_STRING(o)->obj.string.str                    \
               & SCM_STRING_STR_VALUE_MASK))
 #define SCM_SAL_STRING_SET_STR(o, val)                                       \
     (SCM_AS_STRING(o)->obj.string.str =                                      \
-     (char *)((unsigned long)(val) | (unsigned)SCM_STRING_MUTABILITY(o)))
+     (char *)((uintptr_t)(val) | (unsigned)SCM_STRING_MUTABILITY(o)))
 #define SCM_SAL_STRING_LEN(o)          (SCM_AS_STRING(o)->obj.string.len)
 #define SCM_SAL_STRING_SET_LEN(o, len) (SCM_STRING_LEN(o) = (len))
 #define SCM_STRING_MUTABILITY(o)                                             \
-  ((enum ScmMutability)((unsigned long)SCM_AS_STRING(o)->obj.string.str      \
+  ((enum ScmMutability)((uintptr_t)SCM_AS_STRING(o)->obj.string.str          \
                         & SCM_STRING_MUTABILITY_MASK))
 #define SCM_SAL_STRING_MUTABLEP(o)                                           \
     (SCM_STRING_MUTABILITY(o) == SCM_MUTABLE)
 #define SCM_SAL_STRING_SET_MUTABLE(o)                                        \
     (SCM_AS_STRING(o)->obj.string.str =                                      \
-     (char *)((unsigned long)SCM_AS_STRING(o)->obj.string.str | SCM_MUTABLE))
+     (char *)((uintptr_t)SCM_AS_STRING(o)->obj.string.str | SCM_MUTABLE))
 #define SCM_SAL_STRING_SET_IMMUTABLE(o)                                      \
     (SCM_AS_STRING(o)->obj.string.str =                                      \
-     (char *)((unsigned long)SCM_AS_STRING(o)->obj.string.str | SCM_IMMUTABLE))
+     (char *)((uintptr_t)SCM_AS_STRING(o)->obj.string.str | SCM_IMMUTABLE))
 
 #define SCM_SAL_FUNCP(o)                   (SCM_TYPE(o) == ScmFunc)
 #define SCM_SAL_ENTYPE_FUNC(o)             (SCM_ENTYPE((o), ScmFunc))



More information about the uim-commit mailing list