summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-12 02:26:40 (GMT)
committerhobbs <hobbs>1999-12-12 02:26:40 (GMT)
commit9d5c1c3ab0220165e8761184bf18b03a0018c0e8 (patch)
treea0669e049fc8824bf3b37835e2244bac6c56a8d8 /generic/tclCmdAH.c
parent5f809539e37de57ab0461f54c17db348eac6e0dd (diff)
downloadtcl-9d5c1c3ab0220165e8761184bf18b03a0018c0e8.zip
tcl-9d5c1c3ab0220165e8761184bf18b03a0018c0e8.tar.gz
tcl-9d5c1c3ab0220165e8761184bf18b03a0018c0e8.tar.bz2
* tests/var.test:
* generic/tclCompile.c: fixed problem where setting to {} array would intermittently not work. (Fontaine) [Bug: 3339] * generic/tclCmdMZ.c: * generic/tclExecute.c: optimized INST_TRY_CVT_TO_NUMERIC to recognize boolean objects. (Spjuth) [Bug: 2815] * tests/info.test: * tests/parseOld.test: * generic/tclCmdAH.c: * generic/tclProc.c: changed Tcl_UplevelObjCmd (uplevel) and Tcl_EvalObjCmd (eval) to use TCL_EVAL_DIRECT in the single arg case as well, to take advantage of potential pure list input optimization. This means that it won't get byte compiled though, which should be acceptable. * generic/tclBasic.c: made Tcl_EvalObjEx pure list object aware in the TCL_EVAL_DIRECT case for efficiency. * generic/tclUtil.c: made Tcl_ConcatObj pure list object aware, and return a list object in that case [Bug: 2098 2257] * generic/tclMain.c: changed Tcl_Main to not constantly reuse the commandPtr object (interactive case) as it could be shared. (Fellows)
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 3e4de89..731bac0 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdAH.c,v 1.10 1999/10/29 03:03:59 hobbs Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.11 1999/12/12 02:26:41 hobbs Exp $
*/
#include "tclInt.h"
@@ -613,17 +613,15 @@ Tcl_EvalObjCmd(dummy, interp, objc, objv)
}
if (objc == 2) {
- result = Tcl_EvalObjEx(interp, objv[1], 0);
+ result = Tcl_EvalObjEx(interp, objv[1], TCL_EVAL_DIRECT);
} else {
/*
* More than one argument: concatenate them together with spaces
- * between, then evaluate the result.
+ * between, then evaluate the result. Tcl_EvalObjEx will delete
+ * the object when it decrements its refcount after eval'ing it.
*/
-
- objPtr = Tcl_ConcatObj(objc-1, objv+1);
- Tcl_IncrRefCount(objPtr);
- result = Tcl_EvalObjEx(interp, objPtr, 0);
- Tcl_DecrRefCount(objPtr);
+ objPtr = Tcl_ConcatObj(objc-1, objv+1);
+ result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_DIRECT);
}
if (result == TCL_ERROR) {
char msg[32 + TCL_INTEGER_SPACE];