[uim-commit] r2363 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Dec 4 08:01:30 PST 2005
Author: yamaken
Date: 2005-12-04 08:01:26 -0800 (Sun, 04 Dec 2005)
New Revision: 2363
Modified:
branches/r5rs/sigscheme/eval.c
Log:
* sigscheme/eval.c
- (ScmExp_define):
* Simplify syntax check
* Make proper list check optional
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-12-04 15:41:39 UTC (rev 2362)
+++ branches/r5rs/sigscheme/eval.c 2005-12-04 16:01:26 UTC (rev 2363)
@@ -1492,10 +1492,8 @@
(define <variable> <expression>)
========================================================================*/
if (SYMBOLP(var)) {
- if (NULLP(rest))
- SigScm_Error("define : missing expression");
- if (!CONSP(rest))
- ERR_OBJ("proper list is required as <expression> but got", rest);
+ if (!LIST_1_P(rest))
+ ERR_OBJ("exactly 1 arg required but got", rest);
define_internal(var, POP_ARG(rest), env);
ASSERT_NO_MORE_ARG(rest);
@@ -1513,12 +1511,14 @@
body = rest;
if (NULLP(body))
- SigScm_Error("define : missing function body");
+ ERR("define: missing function body");
+#if SCM_STRICT_ARGCHECK
+ /* this is not necessary because checked in closure call */
if (!CONSP(body))
ERR_OBJ("proper list is required as <body> but got", body);
+#endif
- if (!SYMBOLP(procname))
- ERR_OBJ("symbol required but got", procname);
+ ASSERT_SYMBOLP(procname);
define_internal(procname,
Scm_NewClosure(CONS(formals, body), env),
More information about the uim-commit
mailing list