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:
parent
d963e93f3b
commit
f58c472a84
5 changed files with 47 additions and 29 deletions
|
@ -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>
|
2003-05-06 Kevin Ryde <user42@zip.com.au>
|
||||||
|
|
||||||
* numbers.c (scm_difference): In inum - bignum, handle negative inum.
|
* numbers.c (scm_difference): In inum - bignum, handle negative inum.
|
||||||
|
|
|
@ -1221,6 +1221,37 @@ scm_m_atfop (SCM xorig, SCM env SCM_UNUSED)
|
||||||
#endif /* SCM_ENABLE_ELISP */
|
#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
|
||||||
scm_m_expand_body (SCM xorig, SCM env)
|
scm_m_expand_body (SCM xorig, SCM env)
|
||||||
{
|
{
|
||||||
|
|
|
@ -241,6 +241,14 @@ SCM_API SCM scm_eval_x (SCM exp, SCM module);
|
||||||
|
|
||||||
SCM_API void scm_init_eval (void);
|
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 */
|
#endif /* SCM_EVAL_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -20,9 +20,8 @@
|
||||||
|
|
||||||
#include "libguile/_scm.h"
|
#include "libguile/_scm.h"
|
||||||
#include "libguile/eval.h"
|
#include "libguile/eval.h"
|
||||||
#include "libguile/macros.h"
|
|
||||||
#include "libguile/modules.h"
|
|
||||||
#include "libguile/fluids.h"
|
#include "libguile/fluids.h"
|
||||||
|
#include "libguile/modules.h"
|
||||||
|
|
||||||
#include "libguile/validate.h"
|
#include "libguile/validate.h"
|
||||||
#include "libguile/evalext.h"
|
#include "libguile/evalext.h"
|
||||||
|
@ -77,35 +76,10 @@ SCM_DEFINE (scm_defined_p, "defined?", 1, 1, 0,
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#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_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_DEFINE (scm_self_evaluating_p, "self-evaluating?", 1, 0, 0,
|
||||||
(SCM obj),
|
(SCM obj),
|
||||||
"Return #t for objects which Guile considers self-evaluating")
|
"Return #t for objects which Guile considers self-evaluating")
|
||||||
|
|
|
@ -33,7 +33,6 @@ SCM_API void scm_init_evalext (void);
|
||||||
#if (SCM_ENABLE_DEPRECATED == 1)
|
#if (SCM_ENABLE_DEPRECATED == 1)
|
||||||
|
|
||||||
#define scm_definedp scm_defined_p
|
#define scm_definedp scm_defined_p
|
||||||
SCM_API SCM scm_m_undefine (SCM x, SCM env);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue