[uim-commit] r1691 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Fri Sep 30 05:24:15 PDT 2005
Author: yamaken
Date: 2005-09-30 05:24:12 -0700 (Fri, 30 Sep 2005)
New Revision: 1691
Modified:
branches/r5rs/sigscheme/eval.c
Log:
* sigscheme/eval.c
- (symbol_value): Simplify
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-09-30 12:14:58 UTC (rev 1690)
+++ branches/r5rs/sigscheme/eval.c 2005-09-30 12:24:12 UTC (rev 1691)
@@ -524,14 +524,11 @@
return call(proc, args, eval_state, 1);
}
+/* 'var' must be a symbol as precondition */
ScmObj symbol_value(ScmObj var, ScmObj env)
{
- ScmObj val = SCM_NULL;
+ ScmObj val = SCM_FALSE;
- /* sanity check */
- if (!SYMBOLP(var))
- SigScm_ErrorObj("symbol_value : not symbol : ", var);
-
/* first, lookup the environment */
val = lookup_environment(var, env);
if (!NULLP(val)) {
@@ -541,9 +538,8 @@
/* finally, look at the VCELL */
val = SCM_SYMBOL_VCELL(var);
- if (EQ(val, SCM_UNBOUND)) {
+ if (EQ(val, SCM_UNBOUND))
SigScm_ErrorObj("symbol_value : unbound variable ", var);
- }
return val;
}
More information about the uim-commit
mailing list