summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-11-04 21:29:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-11-04 21:29:30 (GMT)
commit5f1098561b5067a8f429be371166ed3b1e6189e4 (patch)
tree67179cf720569f5de357549751755dd9d0332b0e /generic/tclExecute.c
parent9bbdc1599de82b388e548191a669524d9b577653 (diff)
downloadtcl-5f1098561b5067a8f429be371166ed3b1e6189e4.zip
tcl-5f1098561b5067a8f429be371166ed3b1e6189e4.tar.gz
tcl-5f1098561b5067a8f429be371166ed3b1e6189e4.tar.bz2
First draft refactoring the [string first] functionality.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 83b83f1..5ea199d 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -5720,6 +5720,9 @@ TEBCresume(
NEXT_INST_V(1, 3, 1);
case INST_STR_FIND:
+#if 1
+ match = TclStringFind(OBJ_UNDER_TOS, OBJ_AT_TOS, 0);
+#else
ustring1 = Tcl_GetUnicodeFromObj(OBJ_AT_TOS, &length); /* Haystack */
ustring2 = Tcl_GetUnicodeFromObj(OBJ_UNDER_TOS, &length2);/* Needle */
@@ -5734,6 +5737,7 @@ TEBCresume(
}
}
}
+#endif
TRACE(("%.20s %.20s => %d\n",
O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), match));