1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

Fix toplevel-ref with named modules before boot in stack VM

* libguile/vm.c (resolve_variable): Fix, as in
  e23f9e4423.
This commit is contained in:
Andy Wingo 2013-10-27 11:25:18 +01:00
parent 0720f70ed7
commit d6fbf0c00e

View file

@ -641,7 +641,17 @@ resolve_variable (SCM what, SCM module)
sym = SCM_CADR (what);
public = SCM_CADDR (what);
if (scm_is_true (public))
if (!scm_module_system_booted_p)
{
#ifdef VM_ENABLE_PARANOID_ASSERTIONS
ASSERT (scm_is_false (public));
ASSERT (scm_is_true
(scm_equal_p (modname,
scm_list_1 (scm_from_utf8_symbol ("guile")))));
#endif
return scm_lookup (sym);
}
else if (scm_is_true (public))
return scm_public_lookup (modname, sym);
else
return scm_private_lookup (modname, sym);