diff options
author | hobbs <hobbs> | 2007-11-08 00:50:31 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2007-11-08 00:50:31 (GMT) |
commit | 4fca914732d118f26832a92324642c9172452f79 (patch) | |
tree | 82266ee0d67a694bbed3a7f04d7ce11f78ad90e0 /generic/tclExecute.c | |
parent | de6a79373ce5c805811210e7375b156dbe68c253 (diff) | |
download | tcl-4fca914732d118f26832a92324642c9172452f79.zip tcl-4fca914732d118f26832a92324642c9172452f79.tar.gz tcl-4fca914732d118f26832a92324642c9172452f79.tar.bz2 |
* generic/tclStubInit.c:
* generic/tclInt.decls, generic/tclIntDecls.h: added TclByteArrayMatch
* generic/tclUtil.c (TclByteArrayMatch): for efficient glob
* generic/tclExecute.c (TclExecuteByteCode): matching of ByteArray
Tcl_Objs, used in INST_STR_MATCH. [Bug 1827996]
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 17919db..6cac511 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.339 2007/10/20 02:15:05 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.340 2007/11/08 00:50:31 hobbs Exp $ */ #include "tclInt.h" @@ -4063,6 +4063,15 @@ TclExecuteByteCode( ustring2 = Tcl_GetUnicodeFromObj(value2Ptr, &length2); match = TclUniCharMatch(ustring1, length1, ustring2, length2, nocase); + } else if ((valuePtr->typePtr == &tclByteArrayType) + || (value2Ptr->typePtr == &tclByteArrayType)) { + unsigned char *string1, *string2; + int length1, length2; + + string1 = Tcl_GetByteArrayFromObj(valuePtr, &length1); + string2 = Tcl_GetByteArrayFromObj(value2Ptr, &length2); + match = TclByteArrayMatch(string1, length1, string2, length2, + nocase); } else { match = Tcl_StringCaseMatch(TclGetString(valuePtr), TclGetString(value2Ptr), nocase); |