summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2007-12-07 21:24:40 (GMT)
committerhobbs <hobbs>2007-12-07 21:24:40 (GMT)
commit2904158a955ce9de68ba2adf6f4d208ac0d4d1fb (patch)
treeff0702e66499acf947274d981f176c4d49fabc04 /generic/tclCompCmds.c
parentaeb2a84dc4e3d3c70aa56a9e7e9f23d5f6f7f4b8 (diff)
downloadtcl-2904158a955ce9de68ba2adf6f4d208ac0d4d1fb.zip
tcl-2904158a955ce9de68ba2adf6f4d208ac0d4d1fb.tar.gz
tcl-2904158a955ce9de68ba2adf6f4d208ac0d4d1fb.tar.bz2
* generic/tclExecute.c (TclExecuteByteCode INST_REGEXP):
* generic/tclCompCmds.c (TclCompileRegexpCmd): Pass correct RE compile flags at compile time, and use TCL_REG_NOSUB.
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 5f884f6..20acc28 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.135 2007/12/06 16:36:54 dkf Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.136 2007/12/07 21:24:41 hobbs Exp $
*/
#include "tclInt.h"
@@ -3191,7 +3191,14 @@ TclCompileRegexpCmd(
TclEmitInstInt1(INST_STR_MATCH, nocase, envPtr);
}
} else {
- TclEmitInstInt1(INST_REGEXP, nocase, envPtr);
+ /*
+ * 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.
+ */
+ int cflags = TCL_REG_ADVANCED | TCL_REG_NOSUB
+ | (nocase ? TCL_REG_NOCASE : 0);
+ TclEmitInstInt1(INST_REGEXP, cflags, envPtr);
}
return TCL_OK;