diff options
author | dgp <dgp@users.sourceforge.net> | 2016-09-08 15:11:02 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-09-08 15:11:02 (GMT) |
commit | f6c084953c318bea648ee4cfbfb5ed98b3f4084b (patch) | |
tree | 276325851853c926e85577c8e93e824d2c580f9a /generic/tclTest.c | |
parent | 44d1b9173190416cc11129a48eb7a3c90b17b598 (diff) | |
parent | f64a3b8559e5f75f1e208503090cf2503a197470 (diff) | |
download | tcl-f6c084953c318bea648ee4cfbfb5ed98b3f4084b.zip tcl-f6c084953c318bea648ee4cfbfb5ed98b3f4084b.tar.gz tcl-f6c084953c318bea648ee4cfbfb5ed98b3f4084b.tar.bz2 |
merge
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r-- | generic/tclTest.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c index d3da641..e0ed374 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -7476,9 +7476,16 @@ TestInterpResolverCmd( int idx; #define RESOLVER_KEY "testInterpResolver" - if (objc != 2) { - Tcl_WrongNumArgs(interp, 1, objv, "up|down"); - return TCL_ERROR; + if ((objc < 2) || (objc > 3)) { + Tcl_WrongNumArgs(interp, 1, objv, "up|down ?interp?"); + return TCL_ERROR; + } + if (objc == 3) { + interp = Tcl_GetSlave(interp, Tcl_GetString(objv[2])); + if (interp == NULL) { + Tcl_AppendResult(interp, "provided interpreter not found", NULL); + return TCL_ERROR; + } } if (Tcl_GetIndexFromObj(interp, objv[1], table, "operation", TCL_EXACT, &idx) != TCL_OK) { |