diff options
author | Han-Wen Nienhuys <hanwen@lilypond.org> | 2002-12-10 13:26:25 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@lilypond.org> | 2002-12-10 13:26:25 +0000 |
commit | 06e80f59f976c8dda5161804f611f489ec2948a2 (patch) | |
tree | 47abd2e7e898487e2cd89bcf2f53400a913164a0 /libguile/modules.c | |
parent | a12611c3e79216f5c816d9355d250981b20209e0 (diff) | |
download | guile-06e80f59f976c8dda5161804f611f489ec2948a2.tar.gz |
* modules.c (scm_export): new function
* gc-card.c: add a note about malloc()/free() overhead.
Diffstat (limited to 'libguile/modules.c')
-rw-r--r-- | libguile/modules.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/libguile/modules.c b/libguile/modules.c index 28b65caa2..52d054c94 100644 --- a/libguile/modules.c +++ b/libguile/modules.c @@ -115,6 +115,10 @@ scm_c_call_with_current_module (SCM module, return scm_c_with_fluid (the_module, module, func, data); } + +/* + convert "A B C" to scheme list (A B C) + */ static SCM convert_module_name (const char *name) { @@ -177,6 +181,16 @@ scm_c_use_module (const char *name) static SCM module_export_x_var; +/* + TODO: should export this function? --hwn. + */ +static SCM +scm_export (SCM module, SCM namelist) +{ + scm_call_2 (SCM_VARIABLE_REF (module_export_x_var), + module, namelist); +} + /* @code{scm_c_export}(@var{name-list}) @@ -189,7 +203,6 @@ static SCM module_export_x_var; scm_c_export ("add-double-record", "bamboozle-money", NULL); @end example */ - void scm_c_export (const char *name, ...) { @@ -208,11 +221,11 @@ scm_c_export (const char *name, ...) tail = SCM_CDRLOC (*tail); } va_end (ap); - scm_call_2 (SCM_VARIABLE_REF (module_export_x_var), - scm_current_module (), names); + scm_export (scm_current_module(), names); } } + /* Environments */ SCM |