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 | 2151838b5bf48bc97f16712cf10354b2b522d140 (patch) | |
tree | ad7aec82a754b149036d3b7aaccd962fac997c6e /generic/tclTestObj.c | |
parent | ee54cd02ded7113ae8a6a0dd882d2fdf6ca79862 (diff) | |
download | tcl-2151838b5bf48bc97f16712cf10354b2b522d140.zip tcl-2151838b5bf48bc97f16712cf10354b2b522d140.tar.gz tcl-2151838b5bf48bc97f16712cf10354b2b522d140.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); |