summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 3707ca4..c5dfa5d 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.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: tclCmdMZ.c,v 1.69 2002/05/29 10:35:45 dkf Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.70 2002/05/30 03:26:41 hobbs Exp $
*/
#include "tclInt.h"
@@ -1215,15 +1215,13 @@ Tcl_StringObjCmd(dummy, interp, objc, objv)
string1 = (char*) Tcl_GetByteArrayFromObj(objv[0], &length1);
string2 = (char*) Tcl_GetByteArrayFromObj(objv[1], &length2);
strCmpFn = memcmp;
- } else if (((objv[0]->typePtr == &tclStringType)
- && (objv[0]->bytes == NULL))
- || ((objv[1]->typePtr == &tclStringType)
- && (objv[1]->bytes == NULL))) {
+ } else if ((objv[0]->typePtr == &tclStringType)
+ && (objv[1]->typePtr == &tclStringType)) {
/*
- * Use UNICODE versions of string comparisons since that
- * won't cause undue type conversions and we can work with
- * characters all of a fixed size (much faster.), but only
- * when one of the objects is a pure UNICODE object.
+ * Do a unicode-specific comparison if both of the args
+ * are of String type. In benchmark testing this proved
+ * the most efficient check between the unicode and
+ * string comparison operations.
*/
string1 = (char*) Tcl_GetUnicodeFromObj(objv[0], &length1);
string2 = (char*) Tcl_GetUnicodeFromObj(objv[1], &length2);