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

yamaken at freedesktop.org yamaken at freedesktop.org
Thu Oct 6 12:29:18 PDT 2005


Author: yamaken
Date: 2005-10-06 12:29:15 -0700 (Thu, 06 Oct 2005)
New Revision: 1826

Modified:
   branches/r5rs/sigscheme/debug.c
   branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/sigscheme.h
  - (SCM_REINTERPRET_CAST): New macro
* sigscheme/debug.c
  - (print_ScmObj_internal): Suppress the error about casting a
    function pointer to void *, with SCM_REINTERPRET_CAST()


Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c	2005-10-06 18:48:56 UTC (rev 1825)
+++ branches/r5rs/sigscheme/debug.c	2005-10-06 19:29:15 UTC (rev 1826)
@@ -280,7 +280,8 @@
         fprintf(f, "#<c_pointer %p>", SCM_C_POINTER_VALUE(obj));
         break;
     case ScmCFuncPointer:
-        fprintf(f, "#<c_func_pointer %p>", (void*)SCM_C_FUNCPOINTER_VALUE(obj));
+        fprintf(f, "#<c_func_pointer %p>",
+                SCM_REINTERPRET_CAST(void *, SCM_C_FUNCPOINTER_VALUE(obj)));
         break;
     }
 }

Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h	2005-10-06 18:48:56 UTC (rev 1825)
+++ branches/r5rs/sigscheme/sigscheme.h	2005-10-06 19:29:15 UTC (rev 1826)
@@ -60,6 +60,8 @@
 #define SCM_NOINLINE
 #endif /* __GNUC__ */
 
+#define SCM_REINTERPRET_CAST(type, obj) (*(type *)&(obj))
+
 /* RFC: better names for the debug printing */
 #if SCM_DEBUG
 #define SCM_CDBG(args) (SigScm_CategorizedDebug args)



More information about the uim-commit mailing list