From 57ced5b97a794cb75ab273e47c68b05b1b86357e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 19 Nov 2010 13:11:47 +0100 Subject: [PATCH] scm_c_define_module uses define-module* * libguile/modules.c (scm_c_define_module): * module/ice-9/boot-9.scm: Update to have the C function call define-module*. --- libguile/modules.c | 8 ++++---- module/ice-9/boot-9.scm | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libguile/modules.c b/libguile/modules.c index 6c3d0e8b6..43e2373ba 100644 --- a/libguile/modules.c +++ b/libguile/modules.c @@ -49,7 +49,7 @@ static SCM the_module; boot-9 are needed to provide the Scheme interface. */ static SCM the_root_module_var; static SCM module_make_local_var_x_var; -static SCM process_define_module_var; +static SCM define_module_star_var; static SCM process_use_modules_var; static SCM resolve_module_var; static SCM module_public_interface_var; @@ -176,8 +176,8 @@ SCM scm_c_define_module (const char *name, void (*init)(void *), void *data) { - SCM module = scm_call_1 (SCM_VARIABLE_REF (process_define_module_var), - scm_list_1 (convert_module_name (name))); + SCM module = scm_call_1 (SCM_VARIABLE_REF (define_module_star_var), + convert_module_name (name)); if (init) scm_c_call_with_current_module (module, (SCM (*)(void*))init, data); return module; @@ -894,7 +894,7 @@ scm_post_boot_init_modules () scm_module_tag = (SCM_CELL_WORD_1 (module_type) + scm_tc3_struct); resolve_module_var = scm_c_lookup ("resolve-module"); - process_define_module_var = scm_c_lookup ("process-define-module"); + define_module_star_var = scm_c_lookup ("define-module*"); process_use_modules_var = scm_c_lookup ("process-use-modules"); module_export_x_var = scm_c_lookup ("module-export!"); the_root_module_var = scm_c_lookup ("the-root-module"); diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 09340ec08..87afc1566 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -2137,7 +2137,7 @@ If there is no handler at all, Guile prints an error and then exits." ;; Cheat. These bindings are needed by modules.c, but we don't want ;; to move their real definition here because that would be unnatural. ;; -(define process-define-module #f) +(define define-module* #f) (define process-use-modules #f) (define module-export! #f) (define default-duplicate-binding-procedures #f) @@ -2357,6 +2357,9 @@ If there is no handler at all, Guile prints an error and then exits." (lambda (symbol) (symbol-append prefix symbol))) +;; This function is called from "modules.c". If you change it, be +;; sure to update "modules.c" as well. + (define* (define-module* name #:key filename pure version (duplicates '()) (imports '()) (exports '()) (replacements '()) @@ -2432,9 +2435,6 @@ If there is no handler at all, Guile prints an error and then exits." (run-hook module-defined-hook module) module)) -;; This function is called from "modules.c". If you change it, be -;; sure to update "modules.c" as well. - (define (process-define-module args) (define (missing kw) (error "missing argument to define-module keyword" kw)) -- 2.20.1