1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

* eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved

from evalext to eval.  This will allow to make some of the
	definitions in eval.c static.
This commit is contained in:
Dirk Herrmann 2003-05-06 20:05:04 +00:00
parent d963e93f3b
commit f58c472a84
5 changed files with 47 additions and 29 deletions

View file

@ -1,3 +1,9 @@
2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
* eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
from evalext to eval. This will allow to make some of the
definitions in eval.c static.
2003-05-06 Kevin Ryde <user42@zip.com.au>
* numbers.c (scm_difference): In inum - bignum, handle negative inum.

View file

@ -1221,6 +1221,37 @@ scm_m_atfop (SCM xorig, SCM env SCM_UNUSED)
#endif /* SCM_ENABLE_ELISP */
/* Start of the memoizers for deprecated macros. */
#if (SCM_ENABLE_DEPRECATED == 1)
SCM_SYNTAX (s_undefine, "undefine", scm_makacro, scm_m_undefine);
SCM
scm_m_undefine (SCM x, SCM env)
{
SCM arg1 = x;
x = SCM_CDR (x);
SCM_ASSYNT (SCM_TOP_LEVEL (env), "bad placement ", s_undefine);
SCM_ASSYNT (SCM_CONSP (x) && SCM_NULLP (SCM_CDR (x)),
scm_s_expression, s_undefine);
x = SCM_CAR (x);
SCM_ASSYNT (SCM_SYMBOLP (x), scm_s_variable, s_undefine);
arg1 = scm_sym2var (x, scm_env_top_level (env), SCM_BOOL_F);
SCM_ASSYNT (!SCM_FALSEP (arg1) && !SCM_UNBNDP (SCM_VARIABLE_REF (arg1)),
"variable already unbound ", s_undefine);
SCM_VARIABLE_SET (arg1, SCM_UNDEFINED);
#ifdef SICP
return x;
#else
return SCM_UNSPECIFIED;
#endif
}
#endif
SCM
scm_m_expand_body (SCM xorig, SCM env)
{

View file

@ -241,6 +241,14 @@ SCM_API SCM scm_eval_x (SCM exp, SCM module);
SCM_API void scm_init_eval (void);
#if (SCM_ENABLE_DEPRECATED == 1)
SCM_API SCM scm_m_undefine (SCM x, SCM env);
#endif
#endif /* SCM_EVAL_H */
/*

View file

@ -20,9 +20,8 @@
#include "libguile/_scm.h"
#include "libguile/eval.h"
#include "libguile/macros.h"
#include "libguile/modules.h"
#include "libguile/fluids.h"
#include "libguile/modules.h"
#include "libguile/validate.h"
#include "libguile/evalext.h"
@ -77,35 +76,10 @@ SCM_DEFINE (scm_defined_p, "defined?", 1, 1, 0,
}
#undef FUNC_NAME
#if (SCM_ENABLE_DEPRECATED == 1)
SCM_SYNTAX (s_undefine, "undefine", scm_makacro, scm_m_undefine);
SCM
scm_m_undefine (SCM x, SCM env)
{
SCM arg1 = x;
x = SCM_CDR (x);
SCM_ASSYNT (SCM_TOP_LEVEL (env), "bad placement ", s_undefine);
SCM_ASSYNT (SCM_CONSP (x) && SCM_NULLP (SCM_CDR (x)),
scm_s_expression, s_undefine);
x = SCM_CAR (x);
SCM_ASSYNT (SCM_SYMBOLP (x), scm_s_variable, s_undefine);
arg1 = scm_sym2var (x, scm_env_top_level (env), SCM_BOOL_F);
SCM_ASSYNT (!SCM_FALSEP (arg1) && !SCM_UNBNDP (SCM_VARIABLE_REF (arg1)),
"variable already unbound ", s_undefine);
SCM_VARIABLE_SET (arg1, SCM_UNDEFINED);
#ifdef SICP
return x;
#else
return SCM_UNSPECIFIED;
#endif
}
#endif
SCM_REGISTER_PROC (s_map_in_order, "map-in-order", 2, 0, 1, scm_map);
SCM_DEFINE (scm_self_evaluating_p, "self-evaluating?", 1, 0, 0,
(SCM obj),
"Return #t for objects which Guile considers self-evaluating")

View file

@ -33,7 +33,6 @@ SCM_API void scm_init_evalext (void);
#if (SCM_ENABLE_DEPRECATED == 1)
#define scm_definedp scm_defined_p
SCM_API SCM scm_m_undefine (SCM x, SCM env);
#endif