This commit is contained in:
Jan Nieuwenhuizen 2019-11-16 19:02:29 +01:00
parent 63e0996aaa
commit 2deb3d6a35
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 4 additions and 27 deletions

View File

@ -42,16 +42,9 @@ initial_module ()
struct scm *
current_module () /*:((internal)) */
{
/* struct scm *booted_p = hashq_get_handle_ (M0, cstring_to_symbol ("module-system-booted?"), cell_f);
if (booted_p->type == TPAIR && booted_p->cdr != cell_f)
{
*/
struct scm *module = hashq_get_handle_ (M0, cstring_to_symbol ("*current-module*"));
if (module->type == TPAIR && module->cdr != cell_f)
return module->cdr;
/*
}
*/
struct scm *module = hashq_ref_ (M0, cstring_to_symbol ("*current-module*"), cell_f);
if (module != cell_f)
return module;
return M0;
}

View File

@ -143,23 +143,7 @@ lookup_handle (struct scm *name, struct scm *define_p)
struct scm *table = module_defines (module);
handle = hashq_get_handle_ (table, name);
if (handle == cell_f)
{
if (g_debug > 0)
{
eputs ("lookup + define: ");
write_error_ (name);
eputs ("\n");
}
handle = hashq_set_handle_x (table, name, cell_f);
}
else if (handle->cdr == cell_undefined)
{
eputs ("lookup + define: ");
write_error_ (name);
eputs (" found: ");
write_error_ (handle);
eputs ("\n");
}
handle = hashq_set_handle_x (table, name, cell_f);
}
}