summaryrefslogtreecommitdiff
path: root/srfi/srfi-13.c
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2001-08-22 12:00:06 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2001-08-22 12:00:06 +0000
commit80fdeb4e5a869726da90c88ddce377f599515ee8 (patch)
tree40a964e722833f71bfe8c39407220bdb64a36dde /srfi/srfi-13.c
parent88176879bff0b24f67bb995495c461a104b39281 (diff)
downloadguile-80fdeb4e5a869726da90c88ddce377f599515ee8.tar.gz
* tests/srfi-13.test (string-map): Swapped order of string and
proc args to conform with the srfi. (Thanks to Alex Shinn.) * srfi-13.c (string-map): Swapped order of string and proc args to conform with the srfi. (Thanks to Alex Shinn.)
Diffstat (limited to 'srfi/srfi-13.c')
-rw-r--r--srfi/srfi-13.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/srfi/srfi-13.c b/srfi/srfi-13.c
index acd043b9c..a54dfbc1a 100644
--- a/srfi/srfi-13.c
+++ b/srfi/srfi-13.c
@@ -2400,7 +2400,7 @@ SCM_DEFINE (scm_string_concatenate_reverse_shared, "string-concatenate-reverse/s
SCM_DEFINE (scm_string_map, "string-map", 2, 2, 0,
- (SCM s, SCM proc, SCM start, SCM end),
+ (SCM proc, SCM s, SCM start, SCM end),
"@var{proc} is a char->char procedure, it is mapped over\n"
"@var{s}. The order in which the procedure is applied to the\n"
"string elements is not specified.")
@@ -2410,10 +2410,10 @@ SCM_DEFINE (scm_string_map, "string-map", 2, 2, 0,
int cstart, cend;
SCM result;
- SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
+ SCM_VALIDATE_PROC (1, proc);
+ SCM_VALIDATE_SUBSTRING_SPEC_COPY (2, s, cstr,
3, start, cstart,
4, end, cend);
- SCM_VALIDATE_PROC (2, proc);
result = scm_allocate_string (cend - cstart);
p = SCM_STRING_CHARS (result);
while (cstart < cend)
@@ -2430,7 +2430,7 @@ SCM_DEFINE (scm_string_map, "string-map", 2, 2, 0,
SCM_DEFINE (scm_string_map_x, "string-map!", 2, 2, 0,
- (SCM s, SCM proc, SCM start, SCM end),
+ (SCM proc, SCM s, SCM start, SCM end),
"@var{proc} is a char->char procedure, it is mapped over\n"
"@var{s}. The order in which the procedure is applied to the\n"
"string elements is not specified. The string @var{s} is\n"
@@ -2440,10 +2440,10 @@ SCM_DEFINE (scm_string_map_x, "string-map!", 2, 2, 0,
char * cstr, *p;
int cstart, cend;
- SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
+ SCM_VALIDATE_PROC (1, proc);
+ SCM_VALIDATE_SUBSTRING_SPEC_COPY (2, s, cstr,
3, start, cstart,
4, end, cend);
- SCM_VALIDATE_PROC (2, proc);
p = SCM_STRING_CHARS (s) + cstart;
while (cstart < cend)
{