[uim-commit] r1608 - branches/r5rs/uim

yamaken at freedesktop.org yamaken at freedesktop.org
Mon Sep 26 20:41:39 PDT 2005


Author: yamaken
Date: 2005-09-26 20:41:36 -0700 (Mon, 26 Sep 2005)
New Revision: 1608

Removed:
   branches/r5rs/uim/uim-scm-gc.c
Modified:
   branches/r5rs/uim/Makefile.am
   branches/r5rs/uim/uim-scm.c
Log:
* uim/uim-scm-gc.c
* uim/uim-scm.c
* uim/Makefile.am
  - Port r1607 from trunk


Modified: branches/r5rs/uim/Makefile.am
===================================================================
--- branches/r5rs/uim/Makefile.am	2005-09-27 03:21:50 UTC (rev 1607)
+++ branches/r5rs/uim/Makefile.am	2005-09-27 03:41:36 UTC (rev 1608)
@@ -14,7 +14,7 @@
 
 libuim_la_SOURCES = uim.c uim-util.c uim-func.c uim-key.c \
 		uim-internal.h gettext.h uim-encoding.h\
-		siod.h  uim-scm.c uim-scm-gc.c \
+		siod.h  uim-scm.c \
 		uim-helper.c uim-helper-client.c \
 		intl.c \
 		uim-ipc.c \

Deleted: branches/r5rs/uim/uim-scm-gc.c
===================================================================
--- branches/r5rs/uim/uim-scm-gc.c	2005-09-27 03:21:50 UTC (rev 1607)
+++ branches/r5rs/uim/uim-scm-gc.c	2005-09-27 03:41:36 UTC (rev 1608)
@@ -1,92 +0,0 @@
-/*
-
-  Copyright (c) 2003-2005 uim Project http://uim.freedesktop.org/
-
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-
-  1. Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in the
-     documentation and/or other materials provided with the distribution.
-  3. Neither the name of authors nor the names of its contributors
-     may be used to endorse or promote products derived from this software
-     without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
-  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
-  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-  POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-#include "sigscheme/sigscheme.h"
-#include "uim-scm.h"
-
-
-#if UIM_SCM_GCC4_READY_GC
-
-#if !SCM_GCC4_READY_GC
-#error "UIM_SCM_GCC4_READY_GC requires SCM_GCC4_READY_GC-enabled SigScheme"
-#endif
-
-/*
- * For ensuring that these function calls be uninlined. Don't access these
- * variables directly.
- *
- * Exporting the variables ensures that a expression (*f)() is certainly real
- * function call since the variables can be updated from outside of
- * libuim. Therefore, be avoid making the variables static by combining libuim
- * into other codes which enables function inlining for them.
- */
-uim_lisp *(*uim_scm_gc_protect_stack_ptr)(void)
-     = &uim_scm_gc_protect_stack_internal;
-uim_func_ptr (*uim_scm_gc_ensure_uninlined_func_ptr)(uim_func_ptr)
-     = &uim_scm_gc_ensure_uninlined_func_internal;
-#endif /* UIM_SCM_GCC4_READY_GC */
-
-#if UIM_SCM_GCC4_READY_GC
-
-
-void
-uim_scm_gc_protect(uim_lisp *location)
-{
-  SigScm_GC_Protect((ScmObj *)location);
-}
-
-uim_lisp *
-uim_scm_gc_protect_stack_internal(void)
-{
-  /*
-   * &stack_start will be relocated to start of the frame of subsequent
-   * function call
-   */
-  ScmObj stack_start;
-
-  /* intentionally returns invalidated local address */
-  return (uim_lisp *)SigScm_GC_ProtectStack(&stack_start);
-}
-
-void
-uim_scm_gc_unprotect_stack(uim_lisp *stack_start)
-{
-  SigScm_GC_UnprotectStack((ScmObj *)stack_start);
-}
-
-uim_func_ptr
-uim_scm_gc_ensure_uninlined_func_internal(uim_func_ptr func)
-{
-  return func;
-}
-#endif /* UIM_SCM_GCC4_READY_GC */

Modified: branches/r5rs/uim/uim-scm.c
===================================================================
--- branches/r5rs/uim/uim-scm.c	2005-09-27 03:21:50 UTC (rev 1607)
+++ branches/r5rs/uim/uim-scm.c	2005-09-27 03:41:36 UTC (rev 1608)
@@ -43,6 +43,10 @@
 #include "uim-internal.h"
 
 
+#ifdef UIM_COMPAT_SCM
+#include "uim-compat-scm.c"
+#endif
+
 static void uim_scm_error(const char *msg, uim_lisp errobj);
 
 #if UIM_SCM_GCC4_READY_GC
@@ -73,9 +77,21 @@
 static int uim_siod_fatal;
 static FILE *uim_output = NULL;
 
-#ifdef UIM_COMPAT_SCM
-#include "uim-compat-scm.c"
-#endif
+#if UIM_SCM_GCC4_READY_GC
+/*
+ * For ensuring that these function calls be uninlined. Don't access these
+ * variables directly.
+ *
+ * Exporting the variables ensures that a expression (*f)() is certainly real
+ * function call since the variables can be updated from outside of
+ * libuim. Therefore, be avoid making the variables static by combining libuim
+ * into other codes which enables function inlining for them.
+ */
+uim_lisp *(*uim_scm_gc_protect_stack_ptr)(void)
+     = &uim_scm_gc_protect_stack_internal;
+uim_func_ptr (*uim_scm_gc_ensure_uninlined_func_ptr)(uim_func_ptr)
+     = &uim_scm_gc_ensure_uninlined_func_internal;
+#endif /* UIM_SCM_GCC4_READY_GC */
 
 
 static void
@@ -274,7 +290,6 @@
   return (uim_lisp)Scm_NewCFuncPointer((ScmCFunc)func_ptr);
 }
 
-#if !UIM_SCM_GCC4_READY_GC
 void
 uim_scm_gc_protect(uim_lisp *location)
 {
@@ -282,15 +297,35 @@
 }
 
 void
-uim_scm_gc_protect_stack(uim_lisp *stack_start)
+uim_scm_gc_unprotect_stack(uim_lisp *stack_start)
 {
-  SigScm_GC_ProtectStack((ScmObj*)stack_start);
+  SigScm_GC_UnprotectStack((ScmObj*)stack_start);
 }
 
+#if UIM_SCM_GCC4_READY_GC
+uim_lisp *
+uim_scm_gc_protect_stack_internal(void)
+{
+  /*
+   * &stack_start will be relocated to start of the frame of subsequent
+   * function call
+   */
+  ScmObj stack_start;
+
+  /* intentionally returns invalidated local address */
+  return (uim_lisp *)SigScm_GC_ProtectStack(&stack_start);
+}
+
+uim_func_ptr
+uim_scm_gc_ensure_uninlined_func_internal(uim_func_ptr func)
+{
+  return func;
+}
+#else /* UIM_SCM_GCC4_READY_GC */
 void
-uim_scm_gc_unprotect_stack(uim_lisp *stack_start)
+uim_scm_gc_protect_stack(uim_lisp *stack_start)
 {
-  SigScm_GC_UnprotectStack((ScmObj*)stack_start);
+  SigScm_GC_ProtectStack((ScmObj*)stack_start);
 }
 #endif /* UIM_SCM_GCC4_READY_GC */
 



More information about the uim-commit mailing list