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

yamaken at freedesktop.org yamaken at freedesktop.org
Tue Jan 3 08:47:09 PST 2006


Author: yamaken
Date: 2006-01-03 08:47:05 -0800 (Tue, 03 Jan 2006)
New Revision: 2766

Modified:
   branches/r5rs/sigscheme/TODO
   branches/r5rs/sigscheme/env.c
Log:
* sigscheme/env.c
  - (scm_add_environment): Replace a runtime check into contract
* sigscheme/TODO
  - Update


Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO	2006-01-03 16:21:30 UTC (rev 2765)
+++ branches/r5rs/sigscheme/TODO	2006-01-03 16:47:05 UTC (rev 2766)
@@ -11,7 +11,7 @@
 
 * Fix all destructive expression on macros
 
-* Review and refactor all functions in env.c, eval.c, syntax.c, operations*.c,
+* Review and refactor all functions in eval.c, syntax.c, operations*.c,
   encoding.[hc] and *port.[hc] (other files had already been done except for
   the destructive exp on macros)
 

Modified: branches/r5rs/sigscheme/env.c
===================================================================
--- branches/r5rs/sigscheme/env.c	2006-01-03 16:21:30 UTC (rev 2765)
+++ branches/r5rs/sigscheme/env.c	2006-01-03 16:47:05 UTC (rev 2766)
@@ -1,6 +1,6 @@
 /*===========================================================================
  *  FileName : env.c
- *  About    : A Scheme Environemnt Implementation
+ *  About    : A Scheme environemnt implementation
  *
  *  Copyright (C) 2005-2006 Kazuki Ohta <mover AT hct.zaq.ne.jp>
  *
@@ -120,9 +120,7 @@
     ScmObj new_vars, new_vals;
     DECLARE_INTERNAL_FUNCTION("scm_add_environment");
 
-    /* sanity check */
-    if (!SYMBOLP(var))
-        ERR_OBJ("broken environment handling", var);
+    SCM_ASSERT(SYMBOLP(var));
 
     /* add (var, val) pair to the newest frame in env */
     if (NULLP(env)) {
@@ -155,7 +153,7 @@
     /* lookup in frames */
     for (; CONSP(env); env = CDR(env)) {
         frame = CAR(env);
-        ref   = lookup_frame(var, frame);
+        ref = lookup_frame(var, frame);
         if (ref != SCM_INVALID_REF)
             return ref;
     }



More information about the uim-commit mailing list