summaryrefslogtreecommitdiffstats
path: root/generic/tclLink.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/tclLink.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/tclLink.c')
-rw-r--r--generic/tclLink.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclLink.c b/generic/tclLink.c
index a72fee6..00010f3 100644
--- a/generic/tclLink.c
+++ b/generic/tclLink.c
@@ -112,7 +112,7 @@ Tcl_LinkVar(
Link *linkPtr;
int code;
- linkPtr = (Link *) ckalloc(sizeof(Link));
+ linkPtr = ckalloc(sizeof(Link));
linkPtr->interp = interp;
linkPtr->varName = Tcl_NewStringObj(varName, -1);
Tcl_IncrRefCount(linkPtr->varName);
@@ -127,14 +127,14 @@ Tcl_LinkVar(
if (Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, objPtr,
TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) {
Tcl_DecrRefCount(linkPtr->varName);
- ckfree((char *) linkPtr);
+ ckfree(linkPtr);
return TCL_ERROR;
}
code = Tcl_TraceVar(interp, varName, TCL_GLOBAL_ONLY|TCL_TRACE_READS
|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, LinkTraceProc, linkPtr);
if (code != TCL_OK) {
Tcl_DecrRefCount(linkPtr->varName);
- ckfree((char *) linkPtr);
+ ckfree(linkPtr);
}
return code;
}
@@ -172,7 +172,7 @@ Tcl_UnlinkVar(
TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
LinkTraceProc, linkPtr);
Tcl_DecrRefCount(linkPtr->varName);
- ckfree((char *) linkPtr);
+ ckfree(linkPtr);
}
/*
@@ -266,7 +266,7 @@ LinkTraceProc(
if (flags & TCL_TRACE_UNSETS) {
if (Tcl_InterpDeleted(interp)) {
Tcl_DecrRefCount(linkPtr->varName);
- ckfree((char *) linkPtr);
+ ckfree(linkPtr);
} else if (flags & TCL_TRACE_DESTROYED) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);