diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-01-01 18:33:48 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-01-01 18:33:48 -0800 |
commit | 0e4caada3d016a6e10d695e98a1e2ee9a4a4b9d0 (patch) | |
tree | d2569f83775e64766cafaa588b6a4335ccc0b94f /rand.c | |
parent | 82bd3f163894b91c7af377a91beb7a385f21ba55 (diff) | |
download | txr-0e4caada3d016a6e10d695e98a1e2ee9a4a4b9d0.tar.gz txr-0e4caada3d016a6e10d695e98a1e2ee9a4a4b9d0.tar.bz2 txr-0e4caada3d016a6e10d695e98a1e2ee9a4a4b9d0.zip |
Make C globals in TXR Lisp properly assignable, so that for instance
assigning *stdout*, it really overwrites the underlying C variable.
* eval.c (lookup_var): Handle new kind of toplevel binding.
If the hash value is a cptr, it points to a val storage location.
(lookup_val_l): New function.
(op_modplace): Get location of variable using lookup_val_l
rather than assuming there is a cons-based binding.
(reg_var): Argument changed to val * pointer.
Register the variable as a cptr referencing the location.
(eval_init): reg_var calls pass address of each global.
* eval.h (lookup_var_l): Declared.
Diffstat (limited to 'rand.c')
0 files changed, 0 insertions, 0 deletions