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)
commit4dc2505e43d0504fe3d016def13f263c76b20a53 (patch)
tree67179cf720569f5de357549751755dd9d0332b0e /generic/tclExecute.c
parent18a2ebc51dc9923f5cd946614aa87f4293ab40bd (diff)
downloadtcl-4dc2505e43d0504fe3d016def13f263c76b20a53.zip
tcl-4dc2505e43d0504fe3d016def13f263c76b20a53.tar.gz
tcl-4dc2505e43d0504fe3d016def13f263c76b20a53.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));