summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 0a6940eb..679b12aa 100644
--- a/eval.c
+++ b/eval.c
@@ -486,8 +486,14 @@ val lookup_fun(val env, val sym)
val type = or2(find_struct_type(strct),
if2(lisplib_try_load(strct),
find_struct_type(strct)));
- return if2(and2(type, static_slot_p(type, slot)),
- cons(sym, static_slot(type, slot)));
+ if (slot == init_k) {
+ return cons(sym, struct_get_initfun(type));
+ } else if (slot == postinit_k) {
+ return cons(sym, struct_get_postinitfun(type));
+ } else {
+ return if2(and2(type, static_slot_p(type, slot)),
+ cons(sym, static_slot(type, slot)));
+ }
} else if (car(sym) == macro_s) {
return lookup_mac(nil, cadr(sym));
} else if (car(sym) == lambda_s) {