diff options
author | Andy Wingo <wingo@pobox.com> | 2013-10-27 11:25:18 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-10-27 11:25:31 +0100 |
commit | d6fbf0c00e913ab2726f98f70b3026aafb7fcdc6 (patch) | |
tree | 2b6061f8d3ea03e843c375043bd7d455c04b2bbe | |
parent | 0720f70ed7e9de2685409abfe4e2c0dd01f81b74 (diff) | |
download | guile-d6fbf0c00e913ab2726f98f70b3026aafb7fcdc6.tar.gz |
Fix toplevel-ref with named modules before boot in stack VM
* libguile/vm.c (resolve_variable): Fix, as in
e23f9e4423bbbe8521d13e1c9a223612a5e86762.
-rw-r--r-- | libguile/vm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libguile/vm.c b/libguile/vm.c index ff9ea35d3..5a2aef7b9 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -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); |