diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 96bd81cae..49ea4ad12 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,17 @@ +1998-11-21 Mikael Djurfeldt + + * eval.c (SCM_CEVAL): Allow structs implanted in code. + Previously, structs implanted in code were interpreted as forms + the operator of which was a gloc. We solve this by checking for + the zero in the emulated vcell in the struct vtable. Since + implanted structs always will look like forms with a gloc + operator, execution will only be slowed down by maximally one + extra test-and-branch per application. + + * evalext.c (scm_definedp): Removed check for isyms; Added a + second optional argument: It is now possible to supply an + evaluation environment in which to look for the symbol. + 1998-11-19 Mikael Djurfeldt * readline.c (scm_init_readline): Set diff --git a/libguile/eval.c b/libguile/eval.c index 17bc08488..31014b3e4 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -1995,6 +1995,9 @@ dispatch: case scm_tcs_cons_gloc: proc = SCM_GLOC_VAL (SCM_CAR (x)); + if (proc == 0) + /* This is a struct implanted in the code, not a gloc. */ + RETURN (x); SCM_ASRTGO (SCM_NIMP (proc), badfun); #ifndef SCM_RECKLESS #ifdef SCM_CAUTIOUS