summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-01-28 20:23:26 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-01-28 20:23:26 (GMT)
commit9df81fccd3a1cfd90a732c1116cb3bf467bbe802 (patch)
treee185736edb8af9bb4857613d45cdce885fac7085
parent589975911949b9661152610ca04cf5e8e233a109 (diff)
downloadtcl-9df81fccd3a1cfd90a732c1116cb3bf467bbe802.zip
tcl-9df81fccd3a1cfd90a732c1116cb3bf467bbe802.tar.gz
tcl-9df81fccd3a1cfd90a732c1116cb3bf467bbe802.tar.bz2
The outputStage field is now unused, so never allocate it.
-rw-r--r--generic/tclIO.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index c7c11e7..4ae9ec0 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -1489,12 +1489,7 @@ Tcl_CreateChannel(
statePtr->timer = NULL;
statePtr->csPtrR = NULL;
statePtr->csPtrW = NULL;
-
statePtr->outputStage = NULL;
- if ((statePtr->encoding != NULL) && (statePtr->flags & TCL_WRITABLE)) {
- statePtr->outputStage = (char *)
- ckalloc((unsigned) (statePtr->bufSize + 2));
- }
/*
* As we are creating the channel, it is obviously the top for now.
@@ -2757,10 +2752,6 @@ CloseChannel(
}
Tcl_FreeEncoding(statePtr->encoding);
- if (statePtr->outputStage != NULL) {
- ckfree((char *) statePtr->outputStage);
- statePtr->outputStage = NULL;
- }
}
/*
@@ -7151,15 +7142,6 @@ Tcl_SetChannelBufferSize(
statePtr = ((Channel *) chan)->state;
statePtr->bufSize = sz;
-
- if (statePtr->outputStage != NULL) {
- ckfree((char *) statePtr->outputStage);
- statePtr->outputStage = NULL;
- }
- if ((statePtr->encoding != NULL) && (statePtr->flags & TCL_WRITABLE)) {
- statePtr->outputStage = (char *)
- ckalloc((unsigned) (statePtr->bufSize + 2));
- }
}
/*
@@ -7800,17 +7782,6 @@ Tcl_SetChannelOption(
statePtr->inQueueTail = NULL;
}
- /*
- * If encoding or bufsize changes, need to update output staging buffer.
- */
-
- if (statePtr->outputStage != NULL) {
- ckfree(statePtr->outputStage);
- statePtr->outputStage = NULL;
- }
- if ((statePtr->encoding != NULL) && (statePtr->flags & TCL_WRITABLE)) {
- statePtr->outputStage = ckalloc((unsigned) (statePtr->bufSize + 2));
- }
return TCL_OK;
}