summaryrefslogtreecommitdiffstats
path: root/generic/tclTestObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-26 11:53:59 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-26 11:53:59 (GMT)
commit0d7a57fc567f099dc8c77bc0a5d278ced70946d9 (patch)
treeab47b39e8bedb1021813e1161e79eb9a80359b53 /generic/tclTestObj.c
parent9033bb3224bc4a81c96315455704bac2d109c860 (diff)
downloadtcl-0d7a57fc567f099dc8c77bc0a5d278ced70946d9.zip
tcl-0d7a57fc567f099dc8c77bc0a5d278ced70946d9.tar.gz
tcl-0d7a57fc567f099dc8c77bc0a5d278ced70946d9.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.c10
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;