summaryrefslogtreecommitdiff
path: root/libguile/regex-posix.c
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-04 00:17:18 +0000
committerHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-04 00:17:18 +0000
commitc8a1bdc460f892847d0fb3f1321cdeb305160bf8 (patch)
tree5095a98a73d57cf0ce9ed56ed93b8c27bf7527e7 /libguile/regex-posix.c
parentc3164ca85ed8c43a1732a828fc299a05d556a1f3 (diff)
downloadguile-c8a1bdc460f892847d0fb3f1321cdeb305160bf8.tar.gz
new gc
Diffstat (limited to 'libguile/regex-posix.c')
-rw-r--r--libguile/regex-posix.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c
index ddb73ea03..bd7c341e2 100644
--- a/libguile/regex-posix.c
+++ b/libguile/regex-posix.c
@@ -270,14 +270,13 @@ SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0,
/* The match vector must include a cell for the string that was matched,
so add 1. */
mvec = scm_c_make_vector (nmatches + 1, SCM_UNSPECIFIED);
- SCM_VELTS(mvec)[0] = str;
+ SCM_VECTOR_SET(mvec,0, str);
for (i = 0; i < nmatches; ++i)
if (matches[i].rm_so == -1)
- SCM_VELTS(mvec)[i+1] = scm_cons (SCM_MAKINUM (-1), SCM_MAKINUM (-1));
+ SCM_VECTOR_SET(mvec,i+1, scm_cons (SCM_MAKINUM (-1), SCM_MAKINUM (-1)));
else
- SCM_VELTS(mvec)[i+1]
- = scm_cons (scm_long2num (matches[i].rm_so + offset),
- scm_long2num (matches[i].rm_eo + offset));
+ SCM_VECTOR_SET(mvec,i+1,scm_cons (scm_long2num (matches[i].rm_so + offset),
+ scm_long2num (matches[i].rm_eo + offset)));
}
free (matches);
SCM_ALLOW_INTS;