diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-01-11 21:11:08 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-01-11 21:11:08 -0800 |
commit | 8d03c978be83beccae1dd9c00cf310a6d4f93eae (patch) | |
tree | 7413f1ad2af5f574afe91fa09a7ee61b85b82ef0 /eval.c | |
parent | 989f550a28fb8ac7164da38018ca43b542d1a086 (diff) | |
download | txr-8d03c978be83beccae1dd9c00cf310a6d4f93eae.tar.gz txr-8d03c978be83beccae1dd9c00cf310a6d4f93eae.tar.bz2 txr-8d03c978be83beccae1dd9c00cf310a6d4f93eae.zip |
Before releasing 53, there is this.txr-53
* eval.c (c_var_mark): Bugfix: we cannot use cptr_get from
within the garbage collector because of its type check.
Bugfix: synchronize the shadow binding with the variable's
current contents so we don't hang on to a stale object.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1443,7 +1443,8 @@ static void reg_fun(val sym, val fun) static void c_var_mark(val obj) { - struct c_var *cv = (struct c_var *) cptr_get(obj); + struct c_var *cv = (struct c_var *) obj->co.handle; + cv->bind->c.cdr = *cv->loc; /* synchronize shadow binding with variable */ gc_mark(cv->bind); /* we don't mark *loc since it should be a gc-protected C global! */ } |