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/macros.c | |
parent | 15bb587f45b718f08756993fec9274212cc7df58 (diff) |
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/macros.c')
-rw-r--r-- | libguile/macros.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/macros.c b/libguile/macros.c index a0b140126..fe33e7e48 100644 --- a/libguile/macros.c +++ b/libguile/macros.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003, 2006, 2008, 2009, 2010, 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 @@ -92,8 +92,8 @@ SCM_DEFINE (scm_make_syntax_transformer, "make-syntax-transformer", 3, 0, 0, SCM existing_var; SCM_VALIDATE_SYMBOL (1, name); - existing_var = scm_sym2var (name, scm_current_module_lookup_closure (), - SCM_BOOL_F); + + existing_var = scm_module_variable (scm_current_module (), name); if (scm_is_true (existing_var) && scm_is_true (scm_variable_bound_p (existing_var)) && SCM_MACROP (SCM_VARIABLE_REF (existing_var))) |