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)
commit77029bd1e96f8df35c93b67699e5aee7c4546d72 (patch)
treeab47b39e8bedb1021813e1161e79eb9a80359b53 /generic/tclTestObj.c
parentb570644554e1dc8b3efeb2a54cd329b877e8a67c (diff)
downloadtcl-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.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;