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

kzk at freedesktop.org kzk at freedesktop.org
Thu Aug 18 15:09:48 PDT 2005


Author: kzk
Date: 2005-08-18 15:09:44 -0700 (Thu, 18 Aug 2005)
New Revision: 1229

Modified:
   branches/r5rs/sigscheme/eval.c
   branches/r5rs/sigscheme/io.c
Log:
* fix bugs

* sigscheme/io.c
  - (ScmOp_load): fix weird memory handling
* sigscheme/eval.c
  - (ScmOp_lambda): more informational error message
  - (ScmExp_set): can set SCM_NIL as value


Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c	2005-08-18 20:20:20 UTC (rev 1228)
+++ branches/r5rs/sigscheme/eval.c	2005-08-18 22:09:44 UTC (rev 1229)
@@ -917,7 +917,7 @@
     (*tail_flag) = 0;
 
     if CHECK_2_ARGS(exp)
-        SigScm_Error("lambda : too few argument\n");
+        SigScm_ErrorObj("lambda : too few argument ", exp);
 
     return Scm_NewClosure(exp, env);
 }
@@ -970,9 +970,6 @@
     /* set tail_flag */
     (*tail_flag) = 0;
 
-    if (SCM_NULLP(val))
-        SigScm_Error("set! : syntax error\n");
-
     ret = ScmOp_eval(val, env);
     tmp = lookup_environment(sym, env);
     if (SCM_NULLP(tmp)) {

Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c	2005-08-18 20:20:20 UTC (rev 1228)
+++ branches/r5rs/sigscheme/io.c	2005-08-18 22:09:44 UTC (rev 1229)
@@ -438,11 +438,12 @@
 /*===========================================================================
   R5RS : 6.6 Input and Output : 6.6.4 System Interface
 ===========================================================================*/
-ScmObj SigScm_load(const char *c_filename)
+ScmObj SigScm_load(const char *filename)
 {
     ScmObj stack_start;
     ScmObj port         = SCM_NIL;
     ScmObj s_expression = SCM_NIL;
+    char  *c_filename = strdup(filename);
     char  *filepath = NULL;
 
     /* start protecting stack */
@@ -477,6 +478,9 @@
     /* now no need to protect stack */
     SigScm_gc_unprotect_stack(&stack_start);
 
+    /* free str */
+    free(c_filename);
+
     return SCM_UNSPECIFIED;
 }
 



More information about the uim-commit mailing list