diff options
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r-- | generic/tclBinary.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 28f83ad..faa317e 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.19 2004/09/29 22:17:33 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.20 2004/10/06 00:24:16 dgp Exp $ */ #include "tclInt.h" @@ -774,7 +774,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv) * number of bytes and filling with nulls. */ - resultPtr = Tcl_GetObjResult(interp); + resultPtr = Tcl_NewObj(); buffer = Tcl_SetByteArrayLength(resultPtr, length); memset((VOID *) buffer, 0, (size_t) length); @@ -1033,6 +1033,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv) } } } + Tcl_SetObjResult(interp, resultPtr); break; } case BINARY_SCAN: { @@ -1342,8 +1343,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv) */ done: - Tcl_ResetResult(interp); - Tcl_SetLongObj(Tcl_GetObjResult(interp), arg - 4); + Tcl_SetObjResult(interp, Tcl_NewLongObj(arg - 4)); DeleteScanNumberCache(numberCachePtr); break; } @@ -1352,7 +1352,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv) badValue: Tcl_ResetResult(interp); - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "expected ", errorString, + Tcl_AppendResult(interp, "expected ", errorString, " string but got \"", errorValue, "\" instead", NULL); return TCL_ERROR; |