diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2016-10-03 16:55:56 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2016-10-03 16:55:56 (GMT) |
commit | 8826c4b5dc048432fbed200da55eef080c75b32c (patch) | |
tree | 630235c89d7d920a856d6b575a4c28ec3f917fdb /generic/tclTestObj.c | |
parent | 79732cb7bfe403d288455d98bc70bf3c73e09e8f (diff) | |
parent | 2735ae8a8f3cd9a14778858d17f195bf54fc3303 (diff) | |
download | tcl-8826c4b5dc048432fbed200da55eef080c75b32c.zip tcl-8826c4b5dc048432fbed200da55eef080c75b32c.tar.gz tcl-8826c4b5dc048432fbed200da55eef080c75b32c.tar.bz2 |
merge trunk
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); |