diff options
Diffstat (limited to 'libguile/regex-posix.c')
-rw-r--r-- | libguile/regex-posix.c | 9 |
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; |