From 85bb22a22c979e3dd6b36d66216617847a310e25 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 16 Nov 2019 19:02:29 +0100 Subject: [PATCH] WIP --- src/module.c | 13 +++---------- src/variable.c | 18 +----------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/module.c b/src/module.c index 55777210..55896664 100644 --- a/src/module.c +++ b/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; } diff --git a/src/variable.c b/src/variable.c index 5cee9d58..512ec4fb 100644 --- a/src/variable.c +++ b/src/variable.c @@ -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); } }