1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 06:20:23 +02:00

fix bug introduced in the fluid commit

* libguile/vm.c (the-vm): If the dynamic binding of *the-vm* is false,
  make a new vm. Fixes multiple threads with the vm since the *the-vm*
  fluid changes.
This commit is contained in:
Andy Wingo 2008-09-25 11:04:35 +02:00
parent bfffd2583c
commit f63ea2ce78

View file

@ -380,7 +380,14 @@ SCM_DEFINE (scm_the_vm, "the-vm", 0, 0, 0,
"")
#define FUNC_NAME s_scm_the_vm
{
return scm_fluid_ref (scm_the_vm_fluid);
SCM ret;
if (SCM_NFALSEP ((ret = scm_fluid_ref (scm_the_vm_fluid))))
return ret;
ret = make_vm ();
scm_fluid_set_x (scm_the_vm_fluid, ret);
return ret;
}
#undef FUNC_NAME