diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-26 11:53:59 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-26 11:53:59 (GMT) |
commit | 77029bd1e96f8df35c93b67699e5aee7c4546d72 (patch) | |
tree | ab47b39e8bedb1021813e1161e79eb9a80359b53 /generic/tclTestObj.c | |
parent | b570644554e1dc8b3efeb2a54cd329b877e8a67c (diff) | |
download | tcl-77029bd1e96f8df35c93b67699e5aee7c4546d72.zip tcl-77029bd1e96f8df35c93b67699e5aee7c4546d72.tar.gz tcl-77029bd1e96f8df35c93b67699e5aee7c4546d72.tar.bz2 |
Reduce the number of casts used to manage Tcl_Obj internal representations.
Diffstat (limited to 'generic/tclTestObj.c')
-rw-r--r-- | generic/tclTestObj.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index ca8545a..1ef1dc3 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -523,7 +523,7 @@ TestindexobjCmd( } Tcl_GetIndexFromObj(NULL, objv[1], tablePtr, "token", 0, &index); - indexRep = (struct IndexRep *) objv[1]->internalRep.otherValuePtr; + indexRep = objv[1]->internalRep.otherValuePtr; indexRep->index = index2; result = Tcl_GetIndexFromObj(NULL, objv[1], tablePtr, "token", 0, &index); @@ -560,7 +560,7 @@ TestindexobjCmd( if (objv[3]->typePtr != NULL && !strcmp("index", objv[3]->typePtr->name)) { - indexRep = (struct IndexRep *) objv[3]->internalRep.otherValuePtr; + indexRep = objv[3]->internalRep.otherValuePtr; if (indexRep->tablePtr == (void *) argv) { objv[3]->typePtr->freeIntRepProc(objv[3]); objv[3]->typePtr = NULL; @@ -1200,8 +1200,7 @@ TeststringobjCmd( if (varPtr[varIndex] != NULL) { Tcl_ConvertToType(NULL, varPtr[varIndex], Tcl_GetObjType("string")); - strPtr = (TestString *) - (varPtr[varIndex])->internalRep.otherValuePtr; + strPtr = varPtr[varIndex]->internalRep.otherValuePtr; length = (int) strPtr->allocated; } else { length = -1; @@ -1255,8 +1254,7 @@ TeststringobjCmd( if (varPtr[varIndex] != NULL) { Tcl_ConvertToType(NULL, varPtr[varIndex], Tcl_GetObjType("string")); - strPtr = (TestString *) - (varPtr[varIndex])->internalRep.otherValuePtr; + strPtr = varPtr[varIndex]->internalRep.otherValuePtr; length = strPtr->maxChars; } else { length = -1; |