mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 14:50:19 +02:00
Made undef_object into a local static variable.
This commit is contained in:
parent
e59bb51662
commit
09e4d06400
2 changed files with 9 additions and 6 deletions
|
@ -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>
|
2000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
* pairs.c (cxrs, scm_init_pairs): Simplify initialization of
|
* pairs.c (cxrs, scm_init_pairs): Simplify initialization of
|
||||||
|
|
|
@ -253,11 +253,6 @@ scm_ilookup (SCM iloc, SCM env)
|
||||||
|
|
||||||
#endif /* USE_THREADS */
|
#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");
|
SCM_SYMBOL (scm_unbound_variable_key, "unbound-variable");
|
||||||
|
|
||||||
#ifdef USE_THREADS
|
#ifdef USE_THREADS
|
||||||
|
@ -356,8 +351,11 @@ scm_lookupcar (SCM vloc, SCM genv, int check)
|
||||||
scm_misc_error (NULL, "Damaged environment: ~S",
|
scm_misc_error (NULL, "Damaged environment: ~S",
|
||||||
scm_cons (var, SCM_EOL));
|
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;
|
return &undef_object;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_THREADS
|
#ifdef USE_THREADS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue