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

kzk at freedesktop.org kzk at freedesktop.org
Tue Aug 2 23:48:34 EST 2005


Author: kzk
Date: 2005-08-02 06:48:31 -0700 (Tue, 02 Aug 2005)
New Revision: 1100

Modified:
   branches/r5rs/sigscheme/io.c
Log:
* sigscheme/io.c
  - (SigScm_load): protecting stack by calling SigScm_gc_protect_stack
    and SigScm_gc_unprotect_stack. this prevents stack_start_pointer
    to become null in gc phase. 


Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c	2005-08-02 13:45:40 UTC (rev 1099)
+++ branches/r5rs/sigscheme/io.c	2005-08-02 13:48:31 UTC (rev 1100)
@@ -434,8 +434,8 @@
     ScmObj port         = SCM_NIL;
     ScmObj s_expression = SCM_NIL;
 
-    /* set stack start */
-    stack_start_pointer = &stack_start;
+    /* start protecting stack */
+    SigScm_gc_protect_stack(&stack_start);
 
     /* open port */
     port = ScmOp_open_input_file(Scm_NewStringCopying(c_filename));
@@ -452,7 +452,8 @@
     /* close port */
     ScmOp_close_input_port(port);
 
-    stack_start_pointer = NULL;
+    /* now no need to protect stack */
+    SigScm_gc_unprotect_stack(&stack_start);
 
     return SCM_UNSPECIFIED;
 }



More information about the uim-commit mailing list