diff options
author | dgp <dgp@users.sourceforge.net> | 2016-07-20 15:43:29 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-07-20 15:43:29 (GMT) |
commit | 837e136aa6c5930d4a439d9bfc8f41977299d79c (patch) | |
tree | b12a287394d809db2bdd53d57104a9d8b273d853 /generic | |
parent | f211f9c476cee29c88e92a8f9415793f6a583203 (diff) | |
parent | 2151838b5bf48bc97f16712cf10354b2b522d140 (diff) | |
download | tcl-837e136aa6c5930d4a439d9bfc8f41977299d79c.zip tcl-837e136aa6c5930d4a439d9bfc8f41977299d79c.tar.gz tcl-837e136aa6c5930d4a439d9bfc8f41977299d79c.tar.bz2 |
merge trunk
Diffstat (limited to 'generic')
-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); |