mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
move module-public-interface to C, and expose it as C API
* libguile/modules.h: * libguile/modules.c: * ice-9/boot-9.scm (module-public-interface): Move definition of module-public-interface to C, where it is now available as scm_module_public_interface ().
This commit is contained in:
parent
46d2d6f80e
commit
dc68fdb961
3 changed files with 21 additions and 2 deletions
|
@ -620,6 +620,25 @@ SCM_DEFINE (scm_module_import_interface, "module-import-interface", 2, 0, 0,
|
|||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
SCM_SYMBOL (sym_sys_module_public_interface, "%module-public-interface");
|
||||
|
||||
SCM_DEFINE (scm_module_public_interface, "module-public-interface", 1, 0, 0,
|
||||
(SCM module),
|
||||
"Return the public interface of @var{module}.\n\n"
|
||||
"If @var{module} has no public interface, @code{#f} is returned.")
|
||||
#define FUNC_NAME s_scm_module_public_interface
|
||||
{
|
||||
SCM var;
|
||||
|
||||
SCM_VALIDATE_MODULE (1, module);
|
||||
var = scm_module_local_variable (module, sym_sys_module_public_interface);
|
||||
if (scm_is_true (var))
|
||||
return SCM_VARIABLE_REF (var);
|
||||
else
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
/* scm_sym2var
|
||||
*
|
||||
* looks up the variable bound to SYM according to PROC. PROC should be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue