summaryrefslogtreecommitdiff
path: root/srfi
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2003-02-03 14:48:25 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2003-02-03 14:48:25 +0000
commitf9ac1c2df8b712ecb2a44dc5771d90c1ef3cc352 (patch)
tree8ec43bbd04a4f8fd96089d7f32f1622924ef230c /srfi
parent07a68d543f8cbe9a86309177f84723299ce68580 (diff)
downloadguile-f9ac1c2df8b712ecb2a44dc5771d90c1ef3cc352.tar.gz
* srfi-1.c (srfi1_for_each): Corrected argument checking for the
case of two argument lists. (Thanks to Kevin Ryde.)
Diffstat (limited to 'srfi')
-rw-r--r--srfi/ChangeLog5
-rw-r--r--srfi/srfi-1.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/srfi/ChangeLog b/srfi/ChangeLog
index dbb3a72c8..2d090b64f 100644
--- a/srfi/ChangeLog
+++ b/srfi/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-03 Mikael Djurfeldt <djurfeldt@nada.kth.se>
+
+ * srfi-1.c (srfi1_for_each): Corrected argument checking for the
+ case of two argument lists. (Thanks to Kevin Ryde.)
+
2002-12-08 Rob Browning <rlb@defaultvalue.org>
* Makefile.am (srfidir): VERSION -> GUILE_EFFECTIVE_VERSION.
diff --git a/srfi/srfi-1.c b/srfi/srfi-1.c
index 35e9bc389..afd3e78bc 100644
--- a/srfi/srfi-1.c
+++ b/srfi/srfi-1.c
@@ -1,6 +1,6 @@
/* srfi-1.c --- SRFI-1 procedures for Guile
*
- * Copyright (C) 2002 Free Software Foundation, Inc.
+ * Copyright (C) 2002, 2003 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -175,7 +175,7 @@ scm_srfi1_map (SCM proc, SCM arg1, SCM args)
&& len >= 0 && len2 >= -1,
g_srfi1_map,
scm_cons2 (proc, arg1, args),
- len2 >= 0 ? SCM_ARG3 : SCM_ARG2,
+ len2 >= 0 ? SCM_ARG2 : SCM_ARG3,
s_srfi1_map);
while (len > 0)
{
@@ -245,10 +245,10 @@ scm_srfi1_for_each (SCM proc, SCM arg1, SCM args)
if (len < 0 || (len2 >= 0 && len2 < len))
len = len2;
SCM_GASSERTn ((SCM_NULLP (arg2) || SCM_CONSP (arg2))
- && len >= 0 && len2 < len,
+ && len >= 0 && len2 >= -1,
g_srfi1_for_each,
scm_cons2 (proc, arg1, args),
- len2 >= 0 ? SCM_ARG3 : SCM_ARG2,
+ len2 >= 0 ? SCM_ARG2 : SCM_ARG3,
s_srfi1_for_each);
while (len > 0)
{