diff options
author | dgp <dgp@users.sourceforge.net> | 2016-07-20 15:43:08 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-07-20 15:43:08 (GMT) |
commit | fcf66a8c31f5c02f6b8337c822d21e55c07df7f6 (patch) | |
tree | ad7aec82a754b149036d3b7aaccd962fac997c6e /generic/tclTestObj.c | |
parent | 3a61762d4d373cc3b69b72caed75e4f000764173 (diff) | |
download | tcl-fcf66a8c31f5c02f6b8337c822d21e55c07df7f6.zip tcl-fcf66a8c31f5c02f6b8337c822d21e55c07df7f6.tar.gz tcl-fcf66a8c31f5c02f6b8337c822d21e55c07df7f6.tar.bz2 |
Use the new private flag INDEX_TEMP_TABLE in testing command too.
Diffstat (limited to 'generic/tclTestObj.c')
-rw-r--r-- | generic/tclTestObj.c | 18 |
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); |