* If you do not wish that, delete this exception notice.
*/
-/* Software engineering face-lift by Greg J. Badros, 11-Dec-1999,
- gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
\f
SCM_VALIDATE_STRING (1, pat);
SCM_VALIDATE_REST_ARGUMENT (flags);
- SCM_STRING_COERCE_0TERMINATION_X (pat);
/* Examine list of regexp flags. If REG_BASIC is supplied, then
turn off REG_EXTENDED flag (on by default). */
if (SCM_UNBNDP (flags))
flags = SCM_INUM0;
SCM_VALIDATE_INUM (4,flags);
- SCM_STRING_COERCE_0TERMINATION_X (str);
/* re_nsub doesn't account for the `subexpression' representing the
whole regexp, so add 1 to nmatches. */
SCM_VELTS(mvec)[i+1] = scm_cons (SCM_MAKINUM (-1), SCM_MAKINUM (-1));
else
SCM_VELTS(mvec)[i+1]
- = scm_cons(SCM_MAKINUM(matches[i].rm_so + offset),
- SCM_MAKINUM(matches[i].rm_eo + offset));
+ = scm_cons (scm_long2num (matches[i].rm_so + offset),
+ scm_long2num (matches[i].rm_eo + offset));
}
scm_must_free ((char *) matches);
SCM_ALLOW_INTS;