diff options
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r-- | generic/tclIORChan.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 13b8028..0a57eb3 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.4 2005/09/14 21:32:17 dgp Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.5 2005/09/15 16:40:02 dgp Exp $ */ #include <tclInt.h> @@ -1723,10 +1723,12 @@ RcGetOption (clientData, interp, optionName, dsPtr) if ((listc % 2) == 1) { /* Odd number of elements is wrong. */ + Tcl_Obj *objPtr = Tcl_NewObj(); Tcl_ResetResult(interp); - TclObjPrintf(NULL, Tcl_GetObjResult(interp), - "Expected list with even number of elements, got %d element%s instead", - listc, (listc == 1 ? "" : "s")); + TclObjPrintf(NULL, objPtr, "Expected list with even number of " + "elements, got %d element%s instead", listc, + (listc == 1 ? "" : "s")); + Tcl_SetObjResult(interp, objPtr); Tcl_DecrRefCount (resObj); /* Remove reference we held from the invoke */ return TCL_ERROR; } |