summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-05-05 18:37:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-05-05 18:37:43 (GMT)
commit06ccaebaafb55508004011a0cb9ec73a6872c23b (patch)
tree528333d487c2d5ed865f278d50536ea98959741c /generic/tclInt.h
parent9c427bf1e80bcbb05860cb838266240040b91f07 (diff)
downloadtcl-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/tclInt.h')
-rw-r--r--generic/tclInt.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index b6f62dc..6af07ff 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.227 2005/05/05 15:32:20 dgp Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.228 2005/05/05 18:38:01 dgp Exp $
*/
#ifndef _TCLINT
@@ -2718,6 +2718,19 @@ MODULE_SCOPE void TclDbInitNewObj _ANSI_ARGS_((Tcl_Obj *objPtr));
/*
*----------------------------------------------------------------
+ * Macro used by the Tcl core to check whether a pattern has
+ * any characters special to [string match].
+ * The ANSI C "prototype" for this macro is:
+ *
+ * MODULE_SCOPE int TclMatchIsTrivial _ANSI_ARGS_((
+ * CONST char *pattern));
+ *----------------------------------------------------------------
+ */
+
+#define TclMatchIsTrivial(pattern) strpbrk((pattern), "*[]]?\\") == NULL
+
+/*
+ *----------------------------------------------------------------
* Macros used by the Tcl core to set a Tcl_Obj's numeric representation
* avoiding the corresponding function calls in time critical parts of the
* core. They should only be called on unshared objects. The ANSI C