From 38b30033c88080b592fdbc043f295bc9b4e97b5d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 28 Sep 2020 15:00:02 +0000 Subject: Update internal zlib channel type from TCL_CHANNEL_VERSION_3 to TCL_CHANNEL_VERSION_5. Not actually a change, since supported procs are the same. So all internal channels have the same type --- generic/tclZlib.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 604ce64..bdda9bc 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -205,7 +205,7 @@ static void ZlibTransformTimerRun(ClientData clientData); static const Tcl_ChannelType zlibChannelType = { "zlib", - TCL_CHANNEL_VERSION_3, + TCL_CHANNEL_VERSION_5, ZlibTransformClose, ZlibTransformInput, ZlibTransformOutput, @@ -2664,21 +2664,21 @@ ZlibStreamAddCmd( switch ((enum addOptions) index) { case ao_flush: /* -flush */ - if (flush > -1) { + if (flush >= 0) { flush = -2; } else { flush = Z_SYNC_FLUSH; } break; case ao_fullflush: /* -fullflush */ - if (flush > -1) { + if (flush >= 0) { flush = -2; } else { flush = Z_FULL_FLUSH; } break; case ao_finalize: /* -finalize */ - if (flush > -1) { + if (flush >= 0) { flush = -2; } else { flush = Z_FINISH; @@ -2788,21 +2788,21 @@ ZlibStreamPutCmd( switch ((enum putOptions) index) { case po_flush: /* -flush */ - if (flush > -1) { + if (flush >= 0) { flush = -2; } else { flush = Z_SYNC_FLUSH; } break; case po_fullflush: /* -fullflush */ - if (flush > -1) { + if (flush >= 0) { flush = -2; } else { flush = Z_FULL_FLUSH; } break; case po_finalize: /* -finalize */ - if (flush > -1) { + if (flush >= 0) { flush = -2; } else { flush = Z_FINISH; @@ -3683,7 +3683,7 @@ ZlibStackChannelTransform( if (cd->inAllocated < cd->readAheadLimit) { cd->inAllocated = cd->readAheadLimit; } - cd->inBuffer = ckalloc(cd->inAllocated); + cd->inBuffer = (char *)ckalloc(cd->inAllocated); if (cd->flags & IN_HEADER) { if (inflateGetHeader(&cd->inStream, &cd->inHeader.header) != Z_OK) { goto error; -- cgit v0.12