summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2023-02-14 05:50:06 +0000
committerOmar Rizwan <omar@omar.website>2023-02-14 05:50:06 +0000
commit4093ab7373585cdedaed8a6bc7b5d1755554b554 (patch)
tree81fa1d6922e2dc8cd242a0a5029417662358f6c8 /lib
parentClean up environments a bit. This doesn't really help perf (diff)
downloadfolk-4093ab7373585cdedaed8a6bc7b5d1755554b554.tar.gz
folk-4093ab7373585cdedaed8a6bc7b5d1755554b554.zip
More small bits of cleanup
Diffstat (limited to 'lib')
-rw-r--r--lib/environment.tcl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/environment.tcl b/lib/environment.tcl
index e8e76a9c..f23b613f 100644
--- a/lib/environment.tcl
+++ b/lib/environment.tcl
@@ -9,13 +9,15 @@ proc serializeEnvironment {} {
dict set env [namespace tail $name] [set $name]
}
}
- foreach procName [info procs ::SerializableEnvironment::*] {
- dict set env ^[namespace tail $procName] \
- [list [info args $procName] [info body $procName]]
- }
foreach importName [namespace eval ::SerializableEnvironment {namespace import}] {
dict set env %$importName [namespace origin ::SerializableEnvironment::$importName]
}
+ foreach procName [info procs ::SerializableEnvironment::*] {
+ if {![dict exists $env %[namespace tail $procName]]} {
+ dict set env ^[namespace tail $procName] \
+ [list [info args $procName] [info body $procName]]
+ }
+ }
set env
}