From b95fa78d3bf572b190cb26bfc73a35d28a30d0dd Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 13 Apr 2020 19:24:31 -0700 Subject: bugfix: definitions must trigger autoload. When a function, macro, variale, symbol macro or struct is being defined, we must trigger any auto-load for that symbol. If the definition is redefining a library symbol, then if the autoload is later triggered, it will surprisingly reinstate the library definition. * eval.c (rt_defvarl, op_defsymacro, rt_defsymacro, rt_defun, rt_defmacro): Insert calls to lisplib_try_load against the symbol being defined. * struct.c (make_struct_type): Likewise. --- struct.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'struct.c') diff --git a/struct.c b/struct.c index a00345fa..ccdb939f 100644 --- a/struct.c +++ b/struct.c @@ -352,6 +352,8 @@ val make_struct_type(val name, val supers, val self = lit("make-struct-type"); val iter; + lisplib_try_load(name); + if (!listp(supers)) supers = cons(supers, nil); -- cgit v1.2.3