aboutsummaryrefslogtreecommitdiff
path: root/jim.h
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2012-03-13 11:12:00 +1000
committerSteve Bennett <steveb@workware.net.au>2012-03-13 11:58:33 +1000
commit50d6304037f9d77c96c2ddecc4bfacf3fa289f84 (patch)
tree95313708ab24b66b57d9f66d513f3bf06a698ed3 /jim.h
parentb6c95fe34a5fa3b30e1f3f2fd3dc43be5414460a (diff)
downloadjimtcl-50d6304037f9d77c96c2ddecc4bfacf3fa289f84.zip
jimtcl-50d6304037f9d77c96c2ddecc4bfacf3fa289f84.tar.gz
jimtcl-50d6304037f9d77c96c2ddecc4bfacf3fa289f84.tar.bz2
Fix a reference counting bug
Ensure that the internal rep of interp->emptyObj is never changed to a script, since scripts use emptyObj as the source filename when no source info is available. Instead use a special nullScriptObj for this purpose. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim.h')
-rw-r--r--jim.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/jim.h b/jim.h
index 0204090..0f24a02 100644
--- a/jim.h
+++ b/jim.h
@@ -540,6 +540,7 @@ typedef struct Jim_Interp {
Jim_Obj *liveList; /* Linked list of all the live objects. */
Jim_Obj *freeList; /* Linked list of all the unused objects. */
Jim_Obj *currentScriptObj; /* Script currently in execution. */
+ Jim_Obj *nullScriptObj; /* script representation of an empty string */
Jim_Obj *emptyObj; /* Shared empty string object. */
Jim_Obj *trueObj; /* Shared true int object. */
Jim_Obj *falseObj; /* Shared false int object. */