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:
parent
bfffd2583c
commit
f63ea2ce78
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue