1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 06:20:23 +02:00

Made undef_object into a local static variable.

This commit is contained in:
Dirk Herrmann 2000-04-25 12:06:51 +00:00
parent e59bb51662
commit 09e4d06400
2 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
* eval.c (undef_object): Made into a local static variable
(suggested by Jost Boekemeier).
2000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
* pairs.c (cxrs, scm_init_pairs): Simplify initialization of

View file

@ -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