WIP
This commit is contained in:
parent
63e0996aaa
commit
2deb3d6a35
13
src/module.c
13
src/module.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue