diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 15:06:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 15:06:47 (GMT) |
commit | 2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98 (patch) | |
tree | ed891ab3e00ea5888426f25d675aff2d89a00b1d /generic/tclZlib.c | |
parent | 0d3106376c20bbe48cba344885fcad371b72b50f (diff) | |
download | tcl-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/tclZlib.c')
-rw-r--r-- | generic/tclZlib.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 6dabd44..3ddc3fb 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -534,7 +534,7 @@ Tcl_ZlibStreamInit( " TCL_ZLIB_STREAM_INFLATE"); } - zshPtr = (ZlibStreamHandle *) ckalloc(sizeof(ZlibStreamHandle)); + zshPtr = ckalloc(sizeof(ZlibStreamHandle)); zshPtr->interp = interp; zshPtr->mode = mode; zshPtr->format = format; @@ -617,7 +617,7 @@ Tcl_ZlibStreamInit( return TCL_OK; error: - ckfree((char *) zshPtr); + ckfree(zshPtr); return TCL_ERROR; } @@ -725,7 +725,7 @@ ZlibStreamCleanup( Tcl_DecrRefCount(zshPtr->currentInput); } - ckfree((char *) zshPtr); + ckfree(zshPtr); } /* @@ -2691,8 +2691,7 @@ ZlibStackChannelTransform( * use a default. Ignored if not compressing * to produce gzip-format data. */ { - ZlibChannelData *cd = (ZlibChannelData *) - ckalloc(sizeof(ZlibChannelData)); + ZlibChannelData *cd = ckalloc(sizeof(ZlibChannelData)); Tcl_Channel chan; int wbits = 0; int e; @@ -2790,7 +2789,7 @@ ZlibStackChannelTransform( ckfree(cd->outBuffer); deflateEnd(&cd->outStream); } - ckfree((char *) cd); + ckfree(cd); return NULL; } |