summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2007-12-23 21:29:40 (GMT)
committerhobbs <hobbs>2007-12-23 21:29:40 (GMT)
commitf98c90831ad984d50a60f541c50fd3b85c05a6e6 (patch)
tree90b1e3cd3e2b5290c96cf7533067296260067ca9 /generic
parentf762a775b0f50b12a52f497f0cc0078e0be159f5 (diff)
downloadtcl-f98c90831ad984d50a60f541c50fd3b85c05a6e6.zip
tcl-f98c90831ad984d50a60f541c50fd3b85c05a6e6.tar.gz
tcl-f98c90831ad984d50a60f541c50fd3b85c05a6e6.tar.bz2
* generic/tclCompCmds.c (TclCompileRegexpCmd): TCL_REG_NOSUB cannot
* tests/regexp.test (regexp-22.2): be used because it * tests/regexpComp.test: [Bug 1857126] disallows backrefs.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 7dbcc2a..83bb1ae 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompCmds.c,v 1.138 2007/12/19 21:09:37 hobbs Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.139 2007/12/23 21:29:41 hobbs Exp $
*/
#include "tclInt.h"
@@ -3195,10 +3195,9 @@ TclCompileRegexpCmd(
/*
* Pass correct RE compile flags. We use only Int1 (8-bit), but
* that handles all the flags we want to pass.
- * Use TCL_REG_NOSUB as we don't have capture vars.
+ * Don't use TCL_REG_NOSUB as we may have backrefs.
*/
- int cflags = TCL_REG_ADVANCED | TCL_REG_NOSUB
- | (nocase ? TCL_REG_NOCASE : 0);
+ int cflags = TCL_REG_ADVANCED | (nocase ? TCL_REG_NOCASE : 0);
TclEmitInstInt1(INST_REGEXP, cflags, envPtr);
}
@@ -4442,8 +4441,8 @@ TclCompileSwitchCmd(
/*
* Pass correct RE compile flags. We use only Int1
* (8-bit), but that handles all the flags we want to
- * pass.
- * Don't use TCL_REG_NOSUB as we may have capture vars.
+ * pass. Don't use TCL_REG_NOSUB as we may have backrefs
+ * or capture vars.
*/
int cflags = TCL_REG_ADVANCED
| (noCase ? TCL_REG_NOCASE : 0);