WIP
This commit is contained in:
parent
8edfdf255b
commit
85bb22a22c
13
src/module.c
13
src/module.c
|
@ -42,16 +42,9 @@ initial_module ()
|
||||||
struct scm *
|
struct scm *
|
||||||
current_module () /*:((internal)) */
|
current_module () /*:((internal)) */
|
||||||
{
|
{
|
||||||
/* struct scm *booted_p = hashq_get_handle_ (M0, cstring_to_symbol ("module-system-booted?"), cell_f);
|
struct scm *module = hashq_ref_ (M0, cstring_to_symbol ("*current-module*"), cell_f);
|
||||||
if (booted_p->type == TPAIR && booted_p->cdr != cell_f)
|
if (module != cell_f)
|
||||||
{
|
return module;
|
||||||
*/
|
|
||||||
struct scm *module = hashq_get_handle_ (M0, cstring_to_symbol ("*current-module*"));
|
|
||||||
if (module->type == TPAIR && module->cdr != cell_f)
|
|
||||||
return module->cdr;
|
|
||||||
/*
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return M0;
|
return M0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,23 +143,7 @@ lookup_handle (struct scm *name, struct scm *define_p)
|
||||||
struct scm *table = module_defines (module);
|
struct scm *table = module_defines (module);
|
||||||
handle = hashq_get_handle_ (table, name);
|
handle = hashq_get_handle_ (table, name);
|
||||||
if (handle == cell_f)
|
if (handle == cell_f)
|
||||||
{
|
handle = hashq_set_handle_x (table, name, 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");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue