[uim-commit] r1387 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Sat Sep 3 04:14:34 EST 2005
Author: kzk
Date: 2005-09-02 11:14:32 -0700 (Fri, 02 Sep 2005)
New Revision: 1387
Modified:
branches/r5rs/sigscheme/operations.c
Log:
* sigscheme/operations.c
- (ScmOp_length): add sanity check
Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c 2005-09-02 09:10:31 UTC (rev 1386)
+++ branches/r5rs/sigscheme/operations.c 2005-09-02 18:14:32 UTC (rev 1387)
@@ -1016,7 +1016,13 @@
ScmObj ScmOp_length(ScmObj obj)
{
- return Scm_NewInt(ScmOp_c_length(obj));
+ SigScm_Display(obj);
+
+ int len = ScmOp_c_length(obj);
+ if (len < 0)
+ SigScm_ErrorObj("length : list required but got ", obj);
+
+ return Scm_NewInt(len);
}
ScmObj ScmOp_append(ScmObj args, ScmObj env)
More information about the uim-commit
mailing list