diff options
author | dkf <dkf@noemail.net> | 2011-03-26 11:53:59 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2011-03-26 11:53:59 (GMT) |
commit | 4b9e6ef1b0919f9d052e5307fa98a14e83f64321 (patch) | |
tree | ab47b39e8bedb1021813e1161e79eb9a80359b53 /generic/tclTestObj.c | |
parent | 3dc1ed5dc720346b7ce0bb61573a568e938260b0 (diff) | |
download | tcl-4b9e6ef1b0919f9d052e5307fa98a14e83f64321.zip tcl-4b9e6ef1b0919f9d052e5307fa98a14e83f64321.tar.gz tcl-4b9e6ef1b0919f9d052e5307fa98a14e83f64321.tar.bz2 |
Reduce the number of casts used to manage Tcl_Obj internal representations.
FossilOrigin-Name: b2381061a7b89af02f5c0247d1f4fa8164587470
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; |