From f6b8a4a199c9ba358e3571ae9486dd6e3b93e5b2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 18 Feb 2022 20:07:28 -0800 Subject: lisplib: split lisplib_try_load into namespaces. * lisplib.c (lisplib_init): Change sys:try-load (only used by place.tl) to sys:try-load-fun, and register it to (lisplib_try_load): External function becomes static. (lisplib_try_load_fun, lisplib_try_load_var, lisplib_try_load_fun_var, lisplib_try_load_slot, lisplib_try_load_struct, lisplib_try_load_keyword): New functions. * lisplib.h (lisplib_try_load): Declaration removed. (lisplib_try_load): External function becomes static. (lisplib_try_load_fun, lisplib_try_load_var, lisplib_try_load_fun_var, lisplib_try_load_slot, lisplib_try_load_struct, lisplib_try_load_keyword): Declared. * eval.c (lookup_global_var, lookup_var, lookup_symac, lookup_symac_lisp1, rt_defvarl, rt_defv, op_defsymacro, rt_defsymacro, makunbound): Use lisplip_try_load_var. (lookup_fun, lookup_mac, rt_defun, rt_defmacro, fmakunbound, mmakunbound): Use lisplib_try_load_fun. (expand_param_macro): Use lisplib_try_load_keyword, which is a catch-all namespace for anything tied to keywords. * struct.c (make_struct_type, find_struct_type): Use lisplib_try_load_struct. (lookup_sloat_load, lookup_static_slot_load, lookup_static_slot_desc_load, slot_types, static_slot_types): Use lisplib_try_load_slot. * stdlib/place.tl (get-place-macro): Use try-load-fun, rather than try-load. --- stdlib/place.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdlib') diff --git a/stdlib/place.tl b/stdlib/place.tl index 9716aca6..df3d09fb 100644 --- a/stdlib/place.tl +++ b/stdlib/place.tl @@ -61,7 +61,7 @@ (defun sys:get-place-macro (sym) (or [*place-macro* sym] - (progn (sys:try-load sym) [*place-macro* sym]))) + (progn (sys:try-load-fun sym) [*place-macro* sym]))) (defun sys:pl-expand (unex-place env) (while t -- cgit v1.2.3