diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-08-05 12:09:12 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-08-05 12:09:12 (GMT) |
commit | 0f97712d765005441870b6e919297456e986be02 (patch) | |
tree | abf0fe6884e78232b9fa8bb36a11d16458869c8a /win/tclWinChan.c | |
parent | 26c44cb82bf68dc8c98700b4c5aca7da3d913877 (diff) | |
download | tcl-0f97712d765005441870b6e919297456e986be02.zip tcl-0f97712d765005441870b6e919297456e986be02.tar.gz tcl-0f97712d765005441870b6e919297456e986be02.tar.bz2 |
Final part of result generation conversion (modulo any minor blunders)
Diffstat (limited to 'win/tclWinChan.c')
-rw-r--r-- | win/tclWinChan.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 517aa20..bc233ea 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -940,8 +940,9 @@ TclpOpenFileChannel( } TclWinConvertError(err); if (interp != (Tcl_Interp *) NULL) { - Tcl_AppendResult(interp, "couldn't open \"", TclGetString(pathPtr), - "\": ", Tcl_PosixError(interp), NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't open \"%s\": %s", + TclGetString(pathPtr),, Tcl_PosixError(interp))); } return NULL; } @@ -959,9 +960,9 @@ TclpOpenFileChannel( if (handle == INVALID_HANDLE_VALUE) { TclWinConvertError(GetLastError()); if (interp != (Tcl_Interp *) NULL) { - Tcl_AppendResult(interp, "couldn't reopen serial \"", - TclGetString(pathPtr), "\": ", - Tcl_PosixError(interp), NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't reopen serial \"%s\": %s", + TclGetString(pathPtr), Tcl_PosixError(interp))); } return NULL; } @@ -995,8 +996,9 @@ TclpOpenFileChannel( */ channel = NULL; - Tcl_AppendResult(interp, "couldn't open \"", TclGetString(pathPtr), - "\": bad file type", NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't open \"%s\": bad file type", + TclGetString(pathPtr))); Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "BAD_TYPE", NULL); break; |