summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 3a94802..59da527 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.88 2002/05/20 10:22:26 das Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.89 2002/05/29 10:35:45 dkf Exp $
*/
#ifndef _TCLINT
@@ -2359,6 +2359,23 @@ extern Tcl_Mutex tclObjMutex;
#define TclGetString(objPtr) \
((objPtr)->bytes? (objPtr)->bytes : Tcl_GetString((objPtr)))
+/*
+ *----------------------------------------------------------------
+ * Macro used by the Tcl core to compare Unicode strings; this is
+ * more efficient on a big-endian machine, and not hurtful on a
+ * little-endian machine.
+ * The ANSI C "prototype" for this macro is:
+ *
+ * EXTERN int TclUniCharNcmp _ANSI_ARGS_((CONST Tcl_UniChar *cs,
+ * CONST Tcl_UniChar *ct, unsigned long n));
+ *----------------------------------------------------------------
+ */
+#ifdef TCL_OPTIMIZE_UNICODE_COMPARE
+# define TclUniCharNcmp(cs,ct,n) memcmp((cs),(ct),(n)*sizeof(Tcl_UniChar))
+#else /* !TCL_OPTIMIZE_UNICODE_COMPARE */
+# define TclUniCharNcmp Tcl_UniCharNcmp
+#endif /* TCL_OPTIMIZE_UNICODE_COMPARE */
+
#include "tclIntDecls.h"
# undef TCL_STORAGE_CLASS