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

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Dec 23 07:39:42 PST 2005


Author: yamaken
Date: 2005-12-23 07:39:36 -0800 (Fri, 23 Dec 2005)
New Revision: 2689

Modified:
   branches/r5rs/sigscheme/sigscheme.h
   branches/r5rs/sigscheme/storage-gc.c
Log:
* sigscheme/sigscheme.h
  - (scm_gc_protect_with_init): New function decl
* sigscheme/storage-gc.c
  - (scm_gc_protect_with_init): New function


Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h	2005-12-23 05:35:53 UTC (rev 2688)
+++ branches/r5rs/sigscheme/sigscheme.h	2005-12-23 15:39:36 UTC (rev 2689)
@@ -678,6 +678,7 @@
 
 /* storage-gc.c */
 void scm_gc_protect(ScmObj *var);
+void scm_gc_protect_with_init(ScmObj *var, ScmObj init_val);
 void scm_gc_unprotect(ScmObj *var);
 #if SCM_GCC4_READY_GC
 /*

Modified: branches/r5rs/sigscheme/storage-gc.c
===================================================================
--- branches/r5rs/sigscheme/storage-gc.c	2005-12-23 05:35:53 UTC (rev 2688)
+++ branches/r5rs/sigscheme/storage-gc.c	2005-12-23 15:39:36 UTC (rev 2689)
@@ -198,6 +198,7 @@
     return NULL;
 }
 
+/* var must be initialized with a valid ScmObj before invocation */
 void
 scm_gc_protect(ScmObj *var)
 {
@@ -216,6 +217,13 @@
 }
 
 void
+scm_gc_protect_with_init(ScmObj *var, ScmObj init_val)
+{
+    *var = init_val;
+    scm_gc_protect(var);
+}
+
+void
 scm_gc_unprotect(ScmObj *var)
 {
     ScmObj **slot;



More information about the uim-commit mailing list