Tcl Source Code

Artifact [f5dccb4b78]
Login

Artifact f5dccb4b786aad02b17daa867738fb555f30ee71:

Attachment "1400572-84.patch" to ticket [1400572fff] added by dgp 2006-01-10 01:31:05.
Index: generic/tclNamesp.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclNamesp.c,v
retrieving revision 1.31.2.10
diff -u -r1.31.2.10 tclNamesp.c
--- generic/tclNamesp.c	18 Nov 2005 23:07:27 -0000	1.31.2.10
+++ generic/tclNamesp.c	9 Jan 2006 18:29:21 -0000
@@ -3357,7 +3357,7 @@
     Tcl_Obj *CONST objv[];	/* Argument objects. */
 {
     Tcl_Namespace *namespacePtr;
-    Tcl_CallFrame frame;
+    CallFrame frame;
     int i, result;
 
     if (objc < 4) {
@@ -3384,11 +3384,13 @@
      * 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
Index: tests/namespace.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/namespace.test,v
retrieving revision 1.21.2.8
diff -u -r1.21.2.8 namespace.test
--- tests/namespace.test	18 Nov 2005 23:07:27 -0000	1.21.2.8
+++ tests/namespace.test	9 Jan 2006 18:29:22 -0000
@@ -1006,6 +1006,9 @@
     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 @@
     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_*]}