Tcl Source Code

Artifact [becc5211dc]
Login

Artifact becc5211dce2edb5c3bff1857da9dc43b549df48:

Attachment "1400572.patch" to ticket [1400572fff] added by dgp 2006-01-10 01:27:53.
Index: generic/tclNamesp.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclNamesp.c,v
retrieving revision 1.89
diff -u -r1.89 tclNamesp.c
--- generic/tclNamesp.c	27 Nov 2005 02:33:49 -0000	1.89
+++ generic/tclNamesp.c	9 Jan 2006 18:25:17 -0000
@@ -3754,7 +3754,7 @@
     Tcl_Obj *CONST objv[])	/* Argument objects. */
 {
     Tcl_Namespace *namespacePtr;
-    Tcl_CallFrame *framePtr;
+    CallFrame *framePtr;
     int i, result;
 
     if (objc < 4) {
@@ -3780,11 +3780,13 @@
      * 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
Index: tests/namespace.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/namespace.test,v
retrieving revision 1.49
diff -u -r1.49 namespace.test
--- tests/namespace.test	17 Nov 2005 15:29:05 -0000	1.49
+++ tests/namespace.test	9 Jan 2006 18:25:19 -0000
@@ -1023,6 +1023,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 {namespace delete {expand}[namespace children :: test_ns_*]}
@@ -1137,6 +1140,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 {namespace delete {expand}[namespace children :: test_ns_*]}