[uim-commit] r1397 - branches/r5rs/sigscheme
ekato at freedesktop.org
ekato at freedesktop.org
Sun Sep 4 13:39:57 EST 2005
Author: ekato
Date: 2005-09-03 20:39:55 -0700 (Sat, 03 Sep 2005)
New Revision: 1397
Modified:
branches/r5rs/sigscheme/operations-siod.c
Log:
* sigscheme/operations-siod.c (ScmOp_closure_code) : Hack to
produce a siod style closure code.
Modified: branches/r5rs/sigscheme/operations-siod.c
===================================================================
--- branches/r5rs/sigscheme/operations-siod.c 2005-09-04 03:37:52 UTC (rev 1396)
+++ branches/r5rs/sigscheme/operations-siod.c 2005-09-04 03:39:55 UTC (rev 1397)
@@ -153,10 +153,19 @@
ScmObj ScmOp_closure_code(ScmObj closure)
{
+ ScmObj exp, body;
+
if (!CLOSUREP(closure))
SigScm_ErrorObj("%%closure-code : closure required but got ", closure);
- return SCM_CLOSURE_EXP(closure);
+ exp = SCM_CLOSURE_EXP(closure);
+
+ if (NULLP(CDR(CDR(exp))))
+ body = CAR(CDR(exp));
+ else
+ body = Scm_NewCons(Scm_Intern("begin"), CDR(exp));
+
+ return Scm_NewCons(CAR(exp), body);
}
ScmObj ScmOp_verbose(ScmObj args, ScmObj env)
More information about the uim-commit
mailing list