From 1a222b91b96de4e77c2f3bc1c06d80ceabd1c5e0 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Tue, 24 Jun 1997 17:22:45 +0000 Subject: * regex-posix.c (scm_init_regex_posix): Delete the regexp/nosub flag; I don't think we support it. (scm_make_regexp): Make sure the user doesn't pass the regexp/nosub flag. --- libguile/regex-posix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libguile/regex-posix.c') diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 920697584..2896e2737 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -159,7 +159,10 @@ scm_make_regexp (SCM pat, SCM flags) SCM_DEFER_INTS; rx = (regex_t *) scm_must_malloc (sizeof (regex_t), s_make_regexp); - status = regcomp (rx, SCM_ROCHARS (pat), SCM_INUM (flags)); + status = regcomp (rx, SCM_ROCHARS (pat), + /* Make sure they're not passing REG_NOSUB; + regexp-exec assumes we're getting match data. */ + (SCM_INUM (flags) & ~REG_NOSUB)); if (status != 0) { SCM_ALLOW_INTS; @@ -247,7 +250,6 @@ scm_init_regex_posix () /* Compilation flags. */ scm_sysintern ("regexp/extended", scm_long2num (REG_EXTENDED)); scm_sysintern ("regexp/icase", scm_long2num (REG_ICASE)); - scm_sysintern ("regexp/nosub", scm_long2num (REG_NOSUB)); scm_sysintern ("regexp/newline", scm_long2num (REG_NEWLINE)); /* Execution flags. */ -- cgit v1.2.3