aboutsummaryrefslogtreecommitdiff
path: root/regtest.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2017-05-12 12:41:21 +1000
committerSteve Bennett <steveb@workware.net.au>2017-05-12 13:01:45 +1000
commitbc1afe36eb28a54f62503d18e2228a81330ca4ac (patch)
tree17817d9806654ee53be3060afea552600850717f /regtest.tcl
parent1d6b931d0c873bbad193677734dc9d352628577b (diff)
downloadjimtcl-bc1afe36eb28a54f62503d18e2228a81330ca4ac.zip
jimtcl-bc1afe36eb28a54f62503d18e2228a81330ca4ac.tar.gz
jimtcl-bc1afe36eb28a54f62503d18e2228a81330ca4ac.tar.bz2
jim: Fix ref count problem with interpolated dict subst
When duplicating interpolated object type, need to increment ref count of the key to offset the decrement during free. Also remove type-specific dup for dict-substitution which is not needed since it does nothing different from the default dup. Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'regtest.tcl')
-rw-r--r--regtest.tcl1
1 files changed, 1 insertions, 0 deletions
diff --git a/regtest.tcl b/regtest.tcl
index c18e662..2b0fe8c 100644
--- a/regtest.tcl
+++ b/regtest.tcl
@@ -292,6 +292,7 @@ puts "TEST 39 PASSED"
# ref count problem - double free
set d [dict create a b]
lsort r($d)
+catch {dict remove r($d) m}
puts "TEST 40 PASSED"
# TAKE THE FOLLOWING puts AS LAST LINE