summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-06-17 19:31:50 (GMT)
committerstanton <stanton>1999-06-17 19:31:50 (GMT)
commit0db76eb23cf35b0d912eb915711eecbe51c65ac1 (patch)
tree29a224f2498f9498a9df621c37555bc827b4eaee /generic/tclCmdIL.c
parent36fade5673a2b490fdbcdb5e782dcd8c906304d2 (diff)
downloadtcl-0db76eb23cf35b0d912eb915711eecbe51c65ac1.zip
tcl-0db76eb23cf35b0d912eb915711eecbe51c65ac1.tar.gz
tcl-0db76eb23cf35b0d912eb915711eecbe51c65ac1.tar.bz2
* tests/regexp.test:
* generic/tclCmdMZ.c: * generic/tclCmdIL.c: Changed to use new regexp interfaces. Added -expanded, -line, -linestop, and -lineanchor switches to regsub.
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 6db0c53..b121c67 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.12 1999/04/16 00:46:43 stanton Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.13 1999/06/17 19:31:50 stanton Exp $
*/
#include "tclInt.h"
@@ -2372,9 +2372,9 @@ Tcl_LsearchObjCmd(clientData, interp, objc, objv)
index = -1;
for (i = 0; i < listc; i++) {
match = 0;
- bytes = Tcl_GetStringFromObj(listv[i], &elemLen);
switch ((enum options) mode) {
case LSEARCH_EXACT: {
+ bytes = Tcl_GetStringFromObj(listv[i], &elemLen);
if (length == elemLen) {
match = (memcmp(bytes, patternBytes,
(size_t) length) == 0);
@@ -2382,11 +2382,11 @@ Tcl_LsearchObjCmd(clientData, interp, objc, objv)
break;
}
case LSEARCH_GLOB: {
- match = Tcl_StringMatch(bytes, patternBytes);
+ match = Tcl_StringMatch(Tcl_GetString(listv[i]), patternBytes);
break;
}
case LSEARCH_REGEXP: {
- match = TclRegExpMatchObj(interp, bytes, patObj);
+ match = Tcl_RegExpMatchObj(interp, listv[i], patObj);
if (match < 0) {
return TCL_ERROR;
}