summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r--generic/tclIORChan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 6fec40a..eeb11f9 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -739,7 +739,8 @@ TclChanCreateObjCmd(
* Return handle as result of command.
*/
- Tcl_SetResult(interp, (char *)chanPtr->state->channelName, TCL_VOLATILE);
+ Tcl_SetObjResult(interp,
+ Tcl_NewStringObj(chanPtr->state->channelName, -1));
return TCL_OK;
error: