summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-03-24 21:11:52 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-03-24 21:11:52 (GMT)
commit70863b69def44089aa4f7236398532a8241621db (patch)
treed5b19c5aeff579300fc669f5cbad43d8a996850f
parentc4aa85caaac0c854f4eb03535c93bee40c6a2393 (diff)
downloadtcl-70863b69def44089aa4f7236398532a8241621db.zip
tcl-70863b69def44089aa4f7236398532a8241621db.tar.gz
tcl-70863b69def44089aa4f7236398532a8241621db.tar.bz2
Revise the "index" Tcl_ObjType to use the new routine.
-rw-r--r--generic/tclIndexObj.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index ce8b9fb..e00ca8c 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -449,15 +449,9 @@ UpdateStringOfIndex(
Tcl_Obj *objPtr)
{
IndexRep *indexRep = objPtr->internalRep.twoPtrValue.ptr1;
- register char *buf;
- register unsigned len;
register const char *indexStr = EXPAND_OF(indexRep);
- len = strlen(indexStr);
- buf = ckalloc(len + 1);
- memcpy(buf, indexStr, len+1);
- objPtr->bytes = buf;
- objPtr->length = len;
+ Tcl_InitStringRep(objPtr, indexStr, strlen(indexStr));
}
/*