diff options
author | Jim Blandy <jimb@red-bean.com> | 1997-06-24 17:22:45 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1997-06-24 17:22:45 +0000 |
commit | 1a222b91b96de4e77c2f3bc1c06d80ceabd1c5e0 (patch) | |
tree | e4fac1a4deda67bb3ce042a456d1b45e6ac38649 /libguile/regex-posix.c | |
parent | b9c307315a28c323efcadb18383fa1f82e8b12bb (diff) | |
download | guile-1a222b91b96de4e77c2f3bc1c06d80ceabd1c5e0.tar.gz |
* 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.
Diffstat (limited to 'libguile/regex-posix.c')
-rw-r--r-- | libguile/regex-posix.c | 6 |
1 files changed, 4 insertions, 2 deletions
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. */ |