diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 752544c30..15dba2c70 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2000-04-25 Dirk Herrmann + + * eval.c (undef_object): Made into a local static variable + (suggested by Jost Boekemeier). + 2000-04-25 Dirk Herrmann * pairs.c (cxrs, scm_init_pairs): Simplify initialization of diff --git a/libguile/eval.c b/libguile/eval.c index 54618fb2f..d0ddf0f20 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -253,11 +253,6 @@ scm_ilookup (SCM iloc, SCM env) #endif /* USE_THREADS */ -/* scm_lookupcar returns a pointer to this when a variable could not - be found and it should not throw an error. Never assign to this. -*/ -static SCM undef_object = SCM_UNDEFINED; - SCM_SYMBOL (scm_unbound_variable_key, "unbound-variable"); #ifdef USE_THREADS @@ -356,8 +351,11 @@ scm_lookupcar (SCM vloc, SCM genv, int check) scm_misc_error (NULL, "Damaged environment: ~S", scm_cons (var, SCM_EOL)); } - else + else { + /* A variable could not be found, but we shall not throw an error. */ + static SCM undef_object = SCM_UNDEFINED; return &undef_object; + } } #endif #ifdef USE_THREADS