diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2018-01-12 14:13:03 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2018-01-12 14:13:03 (GMT) |
commit | 2cfe8bb5619eb9a1de655bda6a208e9e2fb8b81b (patch) | |
tree | d2ba4e5e5fbaee23838b70ed4f029ea9ab5c7f72 /library/msgcat | |
parent | e9f2695255b873c200a7fc465f860b4fd5c97a02 (diff) | |
download | tcl-2cfe8bb5619eb9a1de655bda6a208e9e2fb8b81b.zip tcl-2cfe8bb5619eb9a1de655bda6a208e9e2fb8b81b.tar.gz tcl-2cfe8bb5619eb9a1de655bda6a208e9e2fb8b81b.tar.bz2 |
Use the test "[namespace which self] ne "::oo::Helpers::self"" to check if we are within an object (undocumented test proposed by dkf on clt 2018-01-12
Diffstat (limited to 'library/msgcat')
-rw-r--r-- | library/msgcat/msgcat.tcl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index 885240f..66cedea 100644 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -1119,7 +1119,10 @@ proc msgcat::ConvertLocale {value} { proc ::msgcat::PackageNamespaceGet {} { uplevel 2 { # Check for no object - if {0 == [llength [info commands self]]} {return [namespace current]} + # (undocumented test proposed by dkf 2018-01-12) + if { [namespace which self] ne "::oo::Helpers::self"} { + return [namespace current] + } set Class [info object class [self]] # Check for classless defined object if {$Class eq {::oo::object}} { |