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

yamaken at freedesktop.org yamaken at freedesktop.org
Tue Jan 3 03:15:35 PST 2006


Author: yamaken
Date: 2006-01-03 03:15:31 -0800 (Tue, 03 Jan 2006)
New Revision: 2755

Modified:
   branches/r5rs/sigscheme/sigscheme.h
   branches/r5rs/sigscheme/storage-compact.h
Log:
* sigscheme/sigscheme.h
  - (SCM_WORD_CAST): Removed
* sigscheme/storage-compact.h
  - (SCM_SAL_FUNC_CFUNC, SCM_SAL_C_FUNCPOINTER_VALUE): Replace
    SCM_WORD_CAST() with (uintptr_t)


Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h	2006-01-03 11:07:49 UTC (rev 2754)
+++ branches/r5rs/sigscheme/sigscheme.h	2006-01-03 11:15:31 UTC (rev 2755)
@@ -66,8 +66,6 @@
 #define SCM_NORETURN
 #endif /* __GNUC__ */
 
-/* Casts a machine word mainly a function pointer and (void *) */
-#define SCM_WORD_CAST(type, obj) ((type)(unsigned long)(obj))
 /*
  * Re-interprets a storage as-is, similarly to reinterpret_cast<type>(obj) of
  * C++. Don't change the semantics. This cast requires that obj is a pointable

Modified: branches/r5rs/sigscheme/storage-compact.h
===================================================================
--- branches/r5rs/sigscheme/storage-compact.h	2006-01-03 11:07:49 UTC (rev 2754)
+++ branches/r5rs/sigscheme/storage-compact.h	2006-01-03 11:15:31 UTC (rev 2755)
@@ -132,6 +132,7 @@
 /*=======================================
   System Include
 =======================================*/
+#include <stdint.h> /* FIXME: make C99-independent */
 #include <stdio.h>
 
 /*=======================================
@@ -859,7 +860,7 @@
  * Func
  */
 #define SCM_SAL_FUNC_CFUNC(a)                   \
-    (SCM_WORD_CAST(ScmFuncType, SCM_OTHERS_CAR_VAL((a), FUNC)))
+    ((ScmFuncType)(uintptr_t)SCM_OTHERS_CAR_VAL((a), FUNC))
 #define SCM_SAL_FUNC_SET_CFUNC(a, val)          \
     SCM_OTHERS_SET_CAR_VAL((a), FUNC, (val))
 
@@ -900,7 +901,7 @@
  * CFuncPointer
  */
 #define SCM_SAL_C_FUNCPOINTER_VALUE(a)                  \
-    (SCM_WORD_CAST(ScmCFunc, SCM_OTHERS_CAR_VAL((a), C_FUNCPOINTER)))
+    ((ScmCFunc)(uintptr_t)SCM_OTHERS_CAR_VAL((a), C_FUNCPOINTER))
 #define SCM_SAL_C_FUNCPOINTER_SET_VALUE(a, val)         \
     SCM_OTHERS_SET_CAR_VAL((a), C_FUNCPOINTER, (val))
 



More information about the uim-commit mailing list