Subject: Do not call updateStringProc directly. We have TclGetString() for that.

From: dgp <[email-masked]>
Date: Fri, 31 Jan 2014 20:02:58 +0000

---
 generic/tclIO.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/generic/tclIO.c b/generic/tclIO.c
index 542d97d..71f8f53 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -10429,17 +10429,8 @@ SetChannelFromAny(
 	}
     }
     if (objPtr->typePtr != &tclChannelType) {
-	Tcl_Channel chan;
+	Tcl_Channel chan = Tcl_GetChannel(interp, TclGetString(objPtr), NULL);
 
-	/*
-	 * We need a valid string with which to check for a valid channel, but
-	 * make sure not to free internal rep until validated. [Bug 1847044]
-	 */
-	if ((objPtr->typePtr != NULL) && (objPtr->bytes == NULL)) {
-	    objPtr->typePtr->updateStringProc(objPtr);
-	}
-
-	chan = Tcl_GetChannel(interp, objPtr->bytes, NULL);
 	if (chan == NULL) {
 	    return TCL_ERROR;
 	}
-- 
cgit v0.12