summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-03-14 15:17:27 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-03-14 15:17:27 (GMT)
commit2d87ed6d2935ef33ceddacd1e31a2695a85f5c44 (patch)
tree5845e68d738d83e831c40f45ca1ec85cb92e9e8c /generic/tclInt.h
parent3cda2dc80540de9b874c6e8a6ede85a55db52427 (diff)
downloadtcl-2d87ed6d2935ef33ceddacd1e31a2695a85f5c44.zip
tcl-2d87ed6d2935ef33ceddacd1e31a2695a85f5c44.tar.gz
tcl-2d87ed6d2935ef33ceddacd1e31a2695a85f5c44.tar.bz2
New routine TclStringReplace() serves as a common implementation for both
compiled and direct eval paths of [string replace]. One routine to debug, optimize, convert to new data structures, etc. This routine will also make a good core engine for [string insert]. With this refactoring done, the value of the INST_STR_REPLACE instruction is no longer clear. Until now, the value of compiling to it was that it routed you through the "better" of the two implementations. An instruction that does nothing different from what invocation to the direct eval fallback would do does not have obvious value.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 57f648c..81b1c05 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4006,6 +4006,9 @@ MODULE_SCOPE int TclStringLast(Tcl_Obj *needle, Tcl_Obj *haystack,
int last);
MODULE_SCOPE Tcl_Obj * TclStringRepeat(Tcl_Interp *interp, Tcl_Obj *objPtr,
int count, int flags);
+MODULE_SCOPE Tcl_Obj * TclStringReplace(Tcl_Interp *interp, Tcl_Obj *objPtr,
+ int first, int count, Tcl_Obj *insertPtr,
+ int flags);
MODULE_SCOPE Tcl_Obj * TclStringReverse(Tcl_Obj *objPtr, int flags);
/* Flag values for the [string] ensemble functions. */