mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 23:00:22 +02:00
(scm_c_export): Do nothing when the first argument is
already the terminating NULL. Thanks to Han-Wen Nienhuys!
This commit is contained in:
parent
19a35d19d9
commit
eb880cef29
1 changed files with 30 additions and 13 deletions
|
@ -176,8 +176,24 @@ scm_c_use_module (const char *name)
|
||||||
|
|
||||||
static SCM module_export_x_var;
|
static SCM module_export_x_var;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
@code{scm_c_export}(@var{name-list})
|
||||||
|
|
||||||
|
@code{scm_c_export} exports the named bindings from the current
|
||||||
|
module, making them visible to users of the module. This function
|
||||||
|
takes a list of string arguments, terminated by NULL, e.g.
|
||||||
|
|
||||||
|
@example
|
||||||
|
scm_c_export ("add-double-record", "bamboozle-money", NULL);
|
||||||
|
@end example
|
||||||
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
scm_c_export (const char *name, ...)
|
scm_c_export (const char *name, ...)
|
||||||
|
{
|
||||||
|
if (name)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
SCM names = scm_cons (scm_str2symbol (name), SCM_EOL);
|
SCM names = scm_cons (scm_str2symbol (name), SCM_EOL);
|
||||||
|
@ -195,6 +211,7 @@ scm_c_export (const char *name, ...)
|
||||||
scm_call_2 (SCM_VARIABLE_REF (module_export_x_var),
|
scm_call_2 (SCM_VARIABLE_REF (module_export_x_var),
|
||||||
scm_current_module (), names);
|
scm_current_module (), names);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Environments */
|
/* Environments */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue