From 38ee79dc06785b01c4638025cb206a4bd275d29f Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 9 Jan 2006 18:34:17 +0000 Subject: * generic/tclNamesp.c (NamespaceInscopeCmd): [namespace inscope] * tests/namespace.test: commands were not reported by [info level] [Bug 1400572]. --- ChangeLog | 6 ++++++ generic/tclNamesp.c | 8 +++++--- tests/namespace.test | 9 ++++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4ec9c9..9d2fb29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-09 Don Porter + + * generic/tclNamesp.c (NamespaceInscopeCmd): [namespace inscope] + * tests/namespace.test: commands were not reported by [info level] + [Bug 1400572]. + 2005-12-20 Donal K. Fellows * generic/tclThreadAlloc.c (Tcl_GetMemoryInfo): Format values as longs diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 0400c1e..1d12831 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.31.2.10 2005/11/18 23:07:27 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.31.2.11 2006/01/09 18:34:17 dgp Exp $ */ #include "tclInt.h" @@ -3357,7 +3357,7 @@ NamespaceInscopeCmd(dummy, interp, objc, objv) Tcl_Obj *CONST objv[]; /* Argument objects. */ { Tcl_Namespace *namespacePtr; - Tcl_CallFrame frame; + CallFrame frame; int i, result; if (objc < 4) { @@ -3384,11 +3384,13 @@ NamespaceInscopeCmd(dummy, interp, objc, objv) * Make the specified namespace the current namespace. */ - result = Tcl_PushCallFrame(interp, &frame, namespacePtr, + result = Tcl_PushCallFrame(interp, (Tcl_CallFrame *)&frame, namespacePtr, /*isProcCallFrame*/ 0); if (result != TCL_OK) { return result; } + frame.objc = objc; + frame.objv = objv; /* * Execute the command. If there is just one argument, just treat it as diff --git a/tests/namespace.test b/tests/namespace.test index 2c36171..68d0c66 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -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: namespace.test,v 1.21.2.8 2005/11/18 23:07:27 msofer Exp $ +# RCS: @(#) $Id: namespace.test,v 1.21.2.9 2006/01/09 18:34:18 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1006,6 +1006,9 @@ test namespace-25.8 {NamespaceEvalCmd, error in eval'd script} knownBug { invoked from within "namespace eval test_ns_1 error foo bar baz"}} catch {unset v} +test namespace-25.9 {NamespaceEvalCmd, 545325} { + namespace eval test_ns_1 info level 0 +} {namespace eval test_ns_1 info level 0} test namespace-26.1 {NamespaceExportCmd, no args and new ns} { catch {eval namespace delete [namespace children :: test_ns_*]} @@ -1120,6 +1123,10 @@ test namespace-29.5 {NamespaceInscopeCmd, has lappend semantics} { list [namespace inscope test_ns_1 cmd x y z] \ [namespace eval test_ns_1 [concat cmd [list x y z]]] } {{::test_ns_1::cmd: v=747, args=x y z} {::test_ns_1::cmd: v=747, args=x y z}} +test namespace-29.6 {NamespaceInscopeCmd, 1400572} { + namespace inscope test_ns_1 {info level 0} +} {namespace inscope test_ns_1 {info level 0}} + test namespace-30.1 {NamespaceOriginCmd, bad args} { catch {eval namespace delete [namespace children :: test_ns_*]} -- cgit v0.12