summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-07-20 15:43:08 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-07-20 15:43:08 (GMT)
commitfcf66a8c31f5c02f6b8337c822d21e55c07df7f6 (patch)
treead7aec82a754b149036d3b7aaccd962fac997c6e
parent3a61762d4d373cc3b69b72caed75e4f000764173 (diff)
downloadtcl-fcf66a8c31f5c02f6b8337c822d21e55c07df7f6.zip
tcl-fcf66a8c31f5c02f6b8337c822d21e55c07df7f6.tar.gz
tcl-fcf66a8c31f5c02f6b8337c822d21e55c07df7f6.tar.bz2
Use the new private flag INDEX_TEMP_TABLE in testing command too.
-rw-r--r--generic/tclTestObj.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index a637498..6053ae3 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -577,23 +577,9 @@ TestindexobjCmd(
}
argv[objc-4] = NULL;
- /*
- * Tcl_GetIndexFromObj assumes that the table is statically-allocated so
- * that its address is different for each index object. If we accidently
- * allocate a table at the same address as that cached in the index
- * object, clear out the object's cached state.
- */
-
- if (objv[3]->typePtr != NULL
- && !strcmp("index", objv[3]->typePtr->name)) {
- indexRep = objv[3]->internalRep.twoPtrValue.ptr1;
- if (indexRep->tablePtr == (void *) argv) {
- TclFreeIntRep(objv[3]);
- }
- }
-
result = Tcl_GetIndexFromObj((setError? interp : NULL), objv[3],
- argv, "token", (allowAbbrev? 0 : TCL_EXACT), &index);
+ argv, "token", INDEX_TEMP_TABLE|(allowAbbrev? 0 : TCL_EXACT),
+ &index);
ckfree(argv);
if (result == TCL_OK) {
Tcl_SetIntObj(Tcl_GetObjResult(interp), index);