summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-12 15:06:47 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-12 15:06:47 (GMT)
commit2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98 (patch)
treeed891ab3e00ea5888426f25d675aff2d89a00b1d /generic/tclResult.c
parent0d3106376c20bbe48cba344885fcad371b72b50f (diff)
downloadtcl-2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98.zip
tcl-2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98.tar.gz
tcl-2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98.tar.bz2
Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts in
rest of Tcl source code. No ABI change. API change *should* be harmless.
Diffstat (limited to 'generic/tclResult.c')
-rw-r--r--generic/tclResult.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 2a04f18..fad3b82 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -75,7 +75,7 @@ Tcl_SaveInterpState(
int status) /* status code for current operation */
{
Interp *iPtr = (Interp *) interp;
- InterpState *statePtr = (InterpState *) ckalloc(sizeof(InterpState));
+ InterpState *statePtr = ckalloc(sizeof(InterpState));
statePtr->status = status;
statePtr->flags = iPtr->flags & ERR_ALREADY_LOGGED;
@@ -205,7 +205,7 @@ Tcl_DiscardInterpState(
Tcl_DecrRefCount(statePtr->errorStack);
}
Tcl_DecrRefCount(statePtr->objResult);
- ckfree((char *) statePtr);
+ ckfree(statePtr);
}
/*
@@ -331,7 +331,7 @@ Tcl_RestoreResult(
*/
if (iPtr->appendResult != NULL) {
- ckfree((char *) iPtr->appendResult);
+ ckfree(iPtr->appendResult);
}
iPtr->appendResult = statePtr->appendResult;
@@ -428,7 +428,7 @@ Tcl_SetResult(
int length = strlen(result);
if (length > TCL_RESULT_SIZE) {
- iPtr->result = ckalloc((unsigned) length+1);
+ iPtr->result = ckalloc(length + 1);
iPtr->freeProc = TCL_DYNAMIC;
} else {
iPtr->result = iPtr->resultSpace;
@@ -831,7 +831,7 @@ SetupAppendBuffer(
} else {
totalSpace *= 2;
}
- new = ckalloc((unsigned) totalSpace);
+ new = ckalloc(totalSpace);
strcpy(new, iPtr->result);
if (iPtr->appendResult != NULL) {
ckfree(iPtr->appendResult);
@@ -983,7 +983,7 @@ ResetObjResult(
} else {
if (objResultPtr->bytes != tclEmptyStringRep) {
if (objResultPtr->bytes) {
- ckfree((char *) objResultPtr->bytes);
+ ckfree(objResultPtr->bytes);
}
objResultPtr->bytes = tclEmptyStringRep;
objResultPtr->length = 0;