X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fdynbind.c;h=9e928a3f335efb80fac2e1faf090ad05391ef42e;hb=eac461c1f1ca91cfe282c779291d582ed6b336cb;hp=32f79f0809bfa0893c5874fd0965117919103f08;hpb=8340bf74c31b29e9552ef8f705b6e1298547c6ab;p=sbcl.git diff --git a/src/runtime/dynbind.c b/src/runtime/dynbind.c index 32f79f0..9e928a3 100644 --- a/src/runtime/dynbind.c +++ b/src/runtime/dynbind.c @@ -81,6 +81,28 @@ unbind(void *th) } void +unbind_variable(lispobj name, void *th) +{ + struct thread *thread=(struct thread *)th; + struct binding *binding; + lispobj symbol; + + binding = ((struct binding *)get_binding_stack_pointer(thread)) - 1; + + symbol = binding->symbol; + + if (symbol != name) + lose("unbind_variable, 0x%p != 0x%p", symbol, name); + + SetTlSymbolValue(symbol, binding->value,thread); + + binding->symbol = 0; + binding->value = 0; + + set_binding_stack_pointer(thread,binding); +} + +void unbind_to_here(lispobj *bsp,void *th) { struct thread *thread=(struct thread *)th;