1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* 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.
This commit is contained in:
Jim Blandy 1997-06-24 17:22:45 +00:00
parent b9c307315a
commit 1a222b91b9

View file

@ -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. */