diff options
author | dgp <dgp@users.sourceforge.net> | 2005-05-05 18:37:43 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-05-05 18:37:43 (GMT) |
commit | 06ccaebaafb55508004011a0cb9ec73a6872c23b (patch) | |
tree | 528333d487c2d5ed865f278d50536ea98959741c /generic/tclCompCmds.c | |
parent | 9c427bf1e80bcbb05860cb838266240040b91f07 (diff) | |
download | tcl-06ccaebaafb55508004011a0cb9ec73a6872c23b.zip tcl-06ccaebaafb55508004011a0cb9ec73a6872c23b.tar.gz tcl-06ccaebaafb55508004011a0cb9ec73a6872c23b.tar.bz2 |
* generic/tclInt.decls: Converted TclMatchIsTrivial to a macro.
* generic/tclInt.h:
* generic/tclUtil.c:
* generic/tclIntDecls.h: `make genstubs`
* generic/tclStubInit.c:
* generic/tclBasic.c: Added callers of TclMatchIsTrivial where
* generic/tclCmdIL.c: a search can be done more efficiently
* generic/tclCompCmds.c:when it is recognized that a pattern match
* generic/tclDictObj.c: is really an exact match. [Patch 1076088]
* generic/tclIO.c:
* generic/tclNamesp.c:
* generic/tclVar.c:
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 97e1ff4..bd0c4b7 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -11,7 +11,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.66 2005/05/05 17:21:03 dgp Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.67 2005/05/05 18:37:57 dgp Exp $ */ #include "tclInt.h" @@ -2612,18 +2612,13 @@ TclCompileStringCmd(interp, parsePtr, envPtr) length = varTokenPtr[1].size; if (!nocase && (i == 0)) { /* - * On the first (pattern) arg, check to see if any - * glob special characters are in the word '*[]?\\'. - * If not, this is the same as 'string equal'. We - * can use strpbrk here because the glob chars are all - * in the ascii-7 range. If -nocase was specified, - * we can't do this because INST_STR_EQ has no support - * for nocase. + * Trivial matches can be done by 'string equal'. + * If -nocase was specified, we can't do this + * because INST_STR_EQ has no support for nocase. */ Tcl_Obj *copy = Tcl_NewStringObj(str, length); Tcl_IncrRefCount(copy); - exactMatch = (strpbrk(Tcl_GetString(copy), - "*[]?\\") == NULL); + exactMatch = TclMatchIsTrivial(Tcl_GetString(copy)); Tcl_DecrRefCount(copy); } TclEmitPush( |