diff options
author | dkf <dkf@noemail.net> | 2011-03-12 15:06:47 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2011-03-12 15:06:47 (GMT) |
commit | dd3a8a349837409f90ccabcc9aef092197d4da6f (patch) | |
tree | ed891ab3e00ea5888426f25d675aff2d89a00b1d /generic/tclIOGT.c | |
parent | 3bc57329cfbbd1026bf237979f491e7336f26c15 (diff) | |
download | tcl-dd3a8a349837409f90ccabcc9aef092197d4da6f.zip tcl-dd3a8a349837409f90ccabcc9aef092197d4da6f.tar.gz tcl-dd3a8a349837409f90ccabcc9aef092197d4da6f.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.
FossilOrigin-Name: 5574bdd262b2672cde48771787370c12854cecf4
Diffstat (limited to 'generic/tclIOGT.c')
-rw-r--r-- | generic/tclIOGT.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index ae13296..6f80c25 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.c @@ -259,7 +259,7 @@ TclChannelTransform( * regime of the underlying channel and to use the same for us too. */ - dataPtr = (TransformChannelData *) ckalloc(sizeof(TransformChannelData)); + dataPtr = ckalloc(sizeof(TransformChannelData)); Tcl_DStringInit(&ds); Tcl_GetChannelOption(interp, chan, "-blocking", &ds); @@ -288,7 +288,7 @@ TclChannelTransform( Tcl_GetChannelName(chan), "\"", NULL); Tcl_DecrRefCount(dataPtr->command); ResultClear(&dataPtr->result); - ckfree((char *) dataPtr); + ckfree(dataPtr); return TCL_ERROR; } @@ -561,7 +561,7 @@ TransformCloseProc( ResultClear(&dataPtr->result); Tcl_DecrRefCount(dataPtr->command); - ckfree((char *) dataPtr); + ckfree(dataPtr); return TCL_OK; } @@ -1227,7 +1227,7 @@ ResultClear( r->used = 0; if (r->allocated) { - ckfree((char *) r->buf); + ckfree(r->buf); r->buf = NULL; r->allocated = 0; } @@ -1371,10 +1371,10 @@ ResultAdd( if (r->allocated == 0) { r->allocated = toWrite + INCREMENT; - r->buf = UCHARP(ckalloc(r->allocated)); + r->buf = ckalloc(r->allocated); } else { r->allocated += toWrite + INCREMENT; - r->buf = UCHARP(ckrealloc((char *) r->buf, r->allocated)); + r->buf = ckrealloc(r->buf, r->allocated); } } |