Tcl Source Code

Artifact [11565d1b02]
Login

Artifact 11565d1b028d5beb151e362e29f5f40131e81ca9:

Attachment "patch" to ticket [403530ffff] added by msofer 2001-04-07 09:03:21. Also attachment "patch" to ticket [219385ffff] added by msofer 2001-04-07 08:59:49.
Index: doc/namespace.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/namespace.n,v
retrieving revision 1.6
diff -r1.6 namespace.n
63c63
< \fBnamespace eval ::a::b {foo bar x y}\fR.
---
> \fB::namespace eval ::a::b {foo bar x y}\fR.
Index: generic/tclNamesp.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclNamesp.c,v
retrieving revision 1.19
diff -r1.19 tclNamesp.c
2644c2644
<  *	    list namespace inscope [namespace current] $arg
---
>  *	    list ::namespace inscope [namespace current] $arg
2647c2647
<  *	"namespace inscope", then the result is just "arg".
---
>  *	"::namespace inscope", then the result is just "arg".
2680a2681,2684
>     while (*arg == ':') { 
> 	arg++; 
> 	length--; 
>     } 
2703c2707
<             Tcl_NewStringObj("namespace", -1));
---
>             Tcl_NewStringObj("::namespace", -1));
Index: library/init.tcl
===================================================================
RCS file: /cvsroot/tcl/tcl/library/init.tcl,v
retrieving revision 1.45
diff -r1.45 init.tcl
166c166
<     if {[regexp "^namespace\[ \t\n\]+inscope" $cmd] && [llength $cmd] == 4} {
---
>     if {[regexp "^:*namespace\[ \t\n\]+inscope" $cmd] && [llength $cmd] == 4} {
Index: tests/namespace-old.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/namespace-old.test,v
retrieving revision 1.5
diff -r1.5 namespace-old.test
807c807
< } {namespace inscope ::test_ns_inscope {"1 2 3" "4 5" 6}}
---
> } {::namespace inscope ::test_ns_inscope {"1 2 3" "4 5" 6}}
812c812
< } {namespace inscope ::test_ns_inscope {one two}}
---
> } {::namespace inscope ::test_ns_inscope {one two}}
817c817
< } {namespace inscope ::test_ns_inscope {one two} three}
---
> } {::namespace inscope ::test_ns_inscope {one two} three}
Index: tests/namespace.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/namespace.test,v
retrieving revision 1.13
diff -r1.13 namespace.test
697c697
< } {namespace inscope :: unknown}
---
> } {::namespace inscope :: unknown}
702c702,713
< } {namespace inscope ::test_ns_1 cmd}
---
> } {::namespace inscope ::test_ns_1 cmd}
> test namespace-22.6 {NamespaceCodeCmd, in other namespace} { 
>     namespace eval test_ns_1 { 
> 	variable v 42 
>     } 
>     namespace eval test_ns_2 { 
> 	proc namespace args {} 
>     } 
>     namespace eval test_ns_2 [namespace eval test_ns_1 { 
> 	namespace code {set v} 
>     }] 
> } {42}