summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 5a16b85..1471ce1 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -3456,6 +3456,7 @@ TclStringFirst(
size_t lh = 0, ln = Tcl_GetCharLength(needle);
size_t value = TCL_INDEX_NONE;
Tcl_UniChar *check, *end, *uh, *un;
+ Tcl_Obj *obj;
if (start == TCL_INDEX_NONE) {
start = 0;
@@ -3531,7 +3532,8 @@ TclStringFirst(
}
}
firstEnd:
- return TclNewWideIntObjFromSize(value);
+ TclNewIndexObj(obj, value);
+ return obj;
}
/*
@@ -3561,6 +3563,7 @@ TclStringLast(
size_t lh = 0, ln = Tcl_GetCharLength(needle);
size_t value = TCL_INDEX_NONE;
Tcl_UniChar *check, *uh, *un;
+ Tcl_Obj *obj;
if (ln == 0) {
/*
@@ -3616,7 +3619,8 @@ TclStringLast(
check--;
}
lastEnd:
- return TclNewWideIntObjFromSize(value);
+ TclNewIndexObj(obj, value);
+ return obj;
}
/*