diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-10 18:07:30 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-10 18:07:30 (GMT) |
commit | 0d03d64e498f454ef8740599f96062de19ee37ad (patch) | |
tree | 925e2f02253d5251bb1afd86de9a86537a35a9e2 | |
parent | cba47573d2456319954f9c072f6921238a5b5e0c (diff) | |
download | tcl-0d03d64e498f454ef8740599f96062de19ee37ad.zip tcl-0d03d64e498f454ef8740599f96062de19ee37ad.tar.gz tcl-0d03d64e498f454ef8740599f96062de19ee37ad.tar.bz2 |
* generic/tclNamesp.c (Tcl_FindNamespaceVar): second change
needed, new test failure in namespace-34.7 (added below so that
the list is complete): [namespace which -variable] does not find
global variables.
. Tk and Itcl tests show no difference to HEAD; XOTcl testsuite
errors out and does not finish
-rw-r--r-- | ChangeLog | 26 | ||||
-rw-r--r-- | generic/tclNamesp.c | 6 | ||||
-rw-r--r-- | tests/namespace.test | 6 |
3 files changed, 30 insertions, 8 deletions
@@ -1,10 +1,28 @@ 2006-10-09 Miguel Sofer <msofer@users.sf.net> - * tests/var.test (var-3.4,7.5,7.8): refer to global vars explicitly (not - what was being tested). Missed in the big patch. + * generic/tclNamesp.c (Tcl_FindNamespaceVar): second change + needed, new test failure in namespace-34.7 (added below so that + the list is complete): [namespace which -variable] does not find + global variables. - * tests/parse.test: fixing some incomplete references to global - variables - missed in the big *.test patch. + . Tk and Itcl tests show no difference to HEAD; XOTcl testsuite + errors out and does not finish + +2006-10-09 Miguel Sofer <msofer@users.sf.net> + + All remaining test failures are actually testing the behaviour + that the TIP disables: + . namespace-old: 5.4 6.12 6.14-15 + . namespace: 14.3 14.5 14.12 17.7 17.10 34.7 + + * tests/namespace.test (namespace-2.2): refer to global vars + explicitly (not what was being tested). Missed in the big patch. + + * tests/var.test (var-3.4,7.5,7.8): refer to global vars + explicitly (not what was being tested). Missed in the big patch. + + * tests/parse.test: refer to global vars explicitly (not what was + being tested). Missed in the big patch. * generic/tclVar.c: minimal change, provides behaviour of TIP 278 but without any optimisation yet. Failures in namespace-old.test, diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 74d7f41..1b94a7a 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,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.100 2006/08/28 13:13:57 dgp Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.100.2.1 2006/10/10 18:07:30 msofer Exp $ */ #include "tclInt.h" @@ -2598,6 +2598,10 @@ Tcl_FindNamespaceVar( * Find the namespace(s) that contain the variable. */ + if (!(flags&TCL_GLOBAL_ONLY)) { + flags |= TCL_NAMESPACE_ONLY; + } + TclGetNamespaceForQualName(interp, name, (Namespace *) contextNsPtr, flags, &nsPtr[0], &nsPtr[1], &cxtNsPtr, &simpleName); diff --git a/tests/namespace.test b/tests/namespace.test index 5d0489d..b485fee 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.56.2.1 2006/10/09 19:31:07 msofer Exp $ +# RCS: @(#) $Id: namespace.test,v 1.56.2.2 2006/10/10 18:07:31 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -39,9 +39,9 @@ test namespace-2.2 {Tcl_GetCurrentNamespace} { set l {} lappend l [namespace current] namespace eval test_ns_1 { - lappend l [namespace current] + lappend ::l [namespace current] namespace eval foo { - lappend l [namespace current] + lappend ::l [namespace current] } } lappend l [namespace current] |