summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-01-09 18:35:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-01-09 18:35:01 (GMT)
commitf0f7e492d15762d9df958a36ffd2cdf03bdce104 (patch)
tree212fe30d8afb25ada1feeb3f8276d67264540fc2
parent773be5c7cba11251f374ffc4e6f22fa0c4723d66 (diff)
downloadtcl-f0f7e492d15762d9df958a36ffd2cdf03bdce104.zip
tcl-f0f7e492d15762d9df958a36ffd2cdf03bdce104.tar.gz
tcl-f0f7e492d15762d9df958a36ffd2cdf03bdce104.tar.bz2
* generic/tclNamesp.c (NamespaceInscopeCmd): [namespace inscope]
* tests/namespace.test: commands were not reported by [info level] [Bug 1400572].
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclNamesp.c10
-rw-r--r--tests/namespace.test9
3 files changed, 20 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c27184..b373549 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-01-09 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclNamesp.c (NamespaceInscopeCmd): [namespace inscope]
+ * tests/namespace.test: commands were not reported by [info level]
+ [Bug 1400572].
+
2006-01-09 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
* generic/tclTrace.c: Stop exporting the guts of the trace command;
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 9e48c49..882c429 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -21,7 +21,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.89 2005/11/27 02:33:49 das Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.90 2006/01/09 18:35:01 dgp Exp $
*/
#include "tclInt.h"
@@ -3754,7 +3754,7 @@ NamespaceInscopeCmd(
Tcl_Obj *CONST objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
- Tcl_CallFrame *framePtr;
+ CallFrame *framePtr;
int i, result;
if (objc < 4) {
@@ -3780,11 +3780,13 @@ NamespaceInscopeCmd(
* Make the specified namespace the current namespace.
*/
- result = TclPushStackFrame(interp, &framePtr, namespacePtr,
- /*isProcCallFrame*/ 0);
+ result = TclPushStackFrame(interp, (Tcl_CallFrame **)&framePtr,
+ namespacePtr, /*isProcCallFrame*/ 0);
if (result != TCL_OK) {
return result;
}
+ framePtr->objc = objc;
+ framePtr->objv = objv;
/*
* Execute the command. If there is just one argument, just treat it as a
diff --git a/tests/namespace.test b/tests/namespace.test
index b393b62..c198a48 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.49 2005/11/17 15:29:05 msofer Exp $
+# RCS: @(#) $Id: namespace.test,v 1.50 2006/01/09 18:35:01 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -1023,6 +1023,9 @@ test namespace-25.8 {NamespaceEvalCmd, error in eval'd script} {
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 {namespace delete {expand}[namespace children :: test_ns_*]}
@@ -1137,6 +1140,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 {namespace delete {expand}[namespace children :: test_ns_*]}