summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2011-05-24 12:23:52 (GMT)
committerdkf <dkf@noemail.net>2011-05-24 12:23:52 (GMT)
commit84894d3d9921cd7e43e0e3f398b5dc53f3e407aa (patch)
tree1332646ee0c2fa27bca16838e206d0222b8dbf59
parent257e222acf55a3f8c2cb992f8874744b92e7373a (diff)
downloadtcl-84894d3d9921cd7e43e0e3f398b5dc53f3e407aa.zip
tcl-84894d3d9921cd7e43e0e3f398b5dc53f3e407aa.tar.gz
tcl-84894d3d9921cd7e43e0e3f398b5dc53f3e407aa.tar.bz2
Remove some useless code from mcset and mcmset: [dict set] builds dictionary levels for us.
FossilOrigin-Name: 076d311d4face72de065fb184a0cf4275d34ba1a
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclInt.h7
-rw-r--r--library/msgcat/msgcat.tcl14
3 files changed, 10 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e64b7c..83fa590 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-24 Donal K. Fellows <dkf@users.sf.net>
+
+ * library/msgcat/msgcat.tcl (msgcat::mcset, msgcat::mcmset): Remove
+ some useless code; [dict set] builds dictionary levels for us.
+
2011-05-17 Andreas Kupries <andreask@activestate.com>
* generic/tclCompile.c (TclFixupForwardJump): Tracked down and fixed
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 8f003be..75f894f 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4227,8 +4227,11 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
*/
#define TclInvalidateNsCmdLookup(nsPtr) \
- if ((nsPtr)->numExportPatterns) { \
- (nsPtr)->exportLookupEpoch++; \
+ if ((nsPtr)->numExportPatterns) { \
+ (nsPtr)->exportLookupEpoch++; \
+ } \
+ if ((nsPtr)->commandPathLength) { \
+ (nsPtr)->cmdRefEpoch++; \
}
/*
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl
index a9b4533..b39820a 100644
--- a/library/msgcat/msgcat.tcl
+++ b/library/msgcat/msgcat.tcl
@@ -313,13 +313,6 @@ proc msgcat::mcset {locale src {dest ""}} {
set locale [string tolower $locale]
- # create nested dictionaries if they do not exist
- if {![dict exists $Msgs $locale]} {
- dict set Msgs $locale [dict create]
- }
- if {![dict exists $Msgs $locale $ns]} {
- dict set Msgs $locale $ns [dict create]
- }
dict set Msgs $locale $ns $src $dest
return $dest
}
@@ -347,13 +340,6 @@ proc msgcat::mcmset {locale pairs } {
set locale [string tolower $locale]
set ns [uplevel 1 [list ::namespace current]]
- # create nested dictionaries if they do not exist
- if {![dict exists $Msgs $locale]} {
- dict set Msgs $locale [dict create]
- }
- if {![dict exists $Msgs $locale $ns]} {
- dict set Msgs $locale $ns [dict create]
- }
foreach {src dest} $pairs {
dict set Msgs $locale $ns $src $dest
}