diff options
Diffstat (limited to 'generic/tclDictObj.c')
-rw-r--r-- | generic/tclDictObj.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 9764c30..9cf2739 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.61 2008/07/17 21:57:15 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.62 2008/07/18 04:23:55 msofer Exp $ */ #include "tclInt.h" @@ -2931,13 +2931,10 @@ DictUpdateCmd( objPtr = Tcl_NewListObj(objc-3, objv+2); Tcl_IncrRefCount(objPtr); + Tcl_IncrRefCount(objv[1]); TclNR_AddCallback(interp, FinalizeDictUpdate, objv[1], objPtr, NULL,NULL); -#if 0 - /* This crashes when doing nested [dict update]s. */ + return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); -#else - return TclNR_EvalObj(interp, objv[objc-1], 0); -#endif } static int @@ -3111,16 +3108,13 @@ DictWithCmd( pathPtr = NULL; if (objc > 3) { pathPtr = Tcl_NewListObj(objc-3, objv+2); + Tcl_IncrRefCount(pathPtr); } Tcl_IncrRefCount(objv[1]); TclNR_AddCallback(interp, FinalizeDictWith, objv[1], keysPtr, pathPtr, NULL); -#if 0 - /* This crashes when doing nested [dict with]s. */ + return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); -#else - return TclNR_EvalObj(interp, objv[objc-1], 0); -#endif } static int |