summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2010-09-22 01:08:49 (GMT)
committerKevin B Kenny <kennykb@acm.org>2010-09-22 01:08:49 (GMT)
commitb915b5fe069f09a9bd7dec58b31623b29133be2f (patch)
tree6a13b2ab5f2e5e8d8efdb0e725da6876b66445ad /generic/tclExecute.c
parent53ebe37f0445f1a132bd20729d41894c6470622a (diff)
downloadtcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.zip
tcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.tar.gz
tcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.tar.bz2
merge changes from HEAD
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 6a4b495..58434c0 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.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: tclExecute.c,v 1.494 2010/09/01 20:35:33 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.494.2.1 2010/09/22 01:08:49 kennykb Exp $
*/
#include "tclInt.h"
@@ -4454,7 +4454,6 @@ TclExecuteByteCode(
value2Ptr = OBJ_AT_TOS;
valuePtr = OBJ_UNDER_TOS;
- /* TODO: Consider more efficient tests than strcmp() */
s1 = TclGetStringFromObj(valuePtr, &s1len);
if (TclListObjLength(interp, value2Ptr, &length) != TCL_OK) {
TRACE_WITH_OBJ(("\"%.30s\" \"%.30s\" => ERROR: ", O2S(valuePtr),
@@ -4479,7 +4478,7 @@ TclExecuteByteCode(
s2len = 0;
}
if (s1len == s2len) {
- match = (strcmp(s1, s2) == 0);
+ match = (memcmp(s1, s2, s1len) == 0);
}
i++;
} while (i < length && match == 0);
@@ -4545,10 +4544,10 @@ TclExecuteByteCode(
*/
if (*pc == INST_STR_NEQ) {
- match = (strcmp(s1, s2) != 0);
+ match = (memcmp(s1, s2, s1len) != 0);
} else {
/* INST_STR_EQ */
- match = (strcmp(s1, s2) == 0);
+ match = (memcmp(s1, s2, s1len) == 0);
}
} else {
match = (*pc == INST_STR_NEQ);