diff options
author | Andy Wingo <wingo@pobox.com> | 2012-05-23 11:46:30 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-05-23 11:49:16 +0200 |
commit | 62e15979b5d773dda79c4f44c07e919b5d0f6e18 (patch) | |
tree | 6df6724acbac08a6fb1baa6736d1687e84e75f3a /libguile/modules.h | |
parent | 15bb587f45b718f08756993fec9274212cc7df58 (diff) | |
download | guile-62e15979b5d773dda79c4f44c07e919b5d0f6e18.tar.gz |
deprecate scm_sym2var
* libguile/deprecated.h:
* libguile/deprecated.c (scm_sym2var): Deprecate this function.
* libguile/modules.h:
* libguile/modules.c (scm_module_ensure_local_variable): New public
function, replacing scm_sym2var with a true definep, without going
through eval closures (which are deprecated).
(scm_current_module): Rework to do something sensible before modules
are booted.
(scm_module_lookup, scm_lookup): Refactor to use scm_module_variable.
(scm_module_define, scm_define): Refactor to use
scm_module_ensure_local_variable.
* libguile/vm-i-system.c (define!): Use scm_define.
* libguile/vm.c (resolve_variable): Use scm_module_lookup.
* libguile/macros.c (scm_make_syntax_transformer): Use
scm_module_variable.
* libguile/gdbint.c (gdb_binding): Use scm_define.
* doc/ref/api-modules.texi (Accessing Modules from C): Add docs for
scm_module_ensure_local_variable.
Diffstat (limited to 'libguile/modules.h')
-rw-r--r-- | libguile/modules.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/modules.h b/libguile/modules.h index 07dc2c3c4..a67ec0897 100644 --- a/libguile/modules.h +++ b/libguile/modules.h @@ -3,7 +3,7 @@ #ifndef SCM_MODULES_H #define SCM_MODULES_H -/* Copyright (C) 1998, 2000, 2001, 2002, 2003, 2006, 2007, 2008, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2001, 2002, 2003, 2006, 2007, 2008, 2011, 2012 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -72,8 +72,6 @@ SCM_API scm_t_bits scm_tc16_eval_closure; SCM_API SCM scm_current_module (void); SCM_API SCM scm_the_root_module (void); -SCM_API SCM scm_module_variable (SCM module, SCM sym); -SCM_API SCM scm_module_local_variable (SCM module, SCM sym); SCM_API SCM scm_interaction_environment (void); SCM_API SCM scm_set_current_module (SCM module); @@ -81,6 +79,10 @@ SCM_API SCM scm_c_call_with_current_module (SCM module, SCM (*func)(void *), void *data); SCM_API void scm_dynwind_current_module (SCM module); +SCM_API SCM scm_module_variable (SCM module, SCM sym); +SCM_API SCM scm_module_local_variable (SCM module, SCM sym); +SCM_API SCM scm_module_ensure_local_variable (SCM module, SCM sym); + SCM_API SCM scm_c_lookup (const char *name); SCM_API SCM scm_c_define (const char *name, SCM val); SCM_API SCM scm_lookup (SCM symbol); @@ -115,8 +117,6 @@ SCM_API SCM scm_c_define_module (const char *name, SCM_API void scm_c_use_module (const char *name); SCM_API void scm_c_export (const char *name, ...); -SCM_API SCM scm_sym2var (SCM sym, SCM thunk, SCM definep); - SCM_API SCM scm_module_public_interface (SCM module); SCM_API SCM scm_module_import_interface (SCM module, SCM sym); SCM_API SCM scm_module_lookup_closure (SCM module); |