diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-03-17 22:09:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-03-17 22:09:20 -0700 |
commit | 1417fd8d7b07bba0ffe574d42e3c787ce067f9c5 (patch) | |
tree | a01dc6f5515fcac5c7382d5ae6fa7e7c715847b2 /eval.c | |
parent | 3f4586d1ee813ecd23456956d5f2c7f4759a5922 (diff) | |
download | txr-1417fd8d7b07bba0ffe574d42e3c787ce067f9c5.tar.gz txr-1417fd8d7b07bba0ffe574d42e3c787ce067f9c5.tar.bz2 txr-1417fd8d7b07bba0ffe574d42e3c787ce067f9c5.zip |
Sandboxing support via *package-alist*.
* eval.c (eval_init): Register *package-alist* variable,
taking on the contents of the packages variable.
* lib.c (package_alist_s): New symbol variable.
(make_package, packagep, find_package, package_alist); Work
with dynamic package alist variable via cur_package_alist_loc
macro.
(get_current_package_alist_loc): New function.
* lib.h (cur_package_alist_loc): New macro.
(packages, package_alist_s, get_current_package_alist_loc):
Declared.
* txr.1: Documented *package-alist* along with notes about
sandboxing. Documented that the package-alist function is
now obsolescent.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -5866,6 +5866,7 @@ void eval_init(void) reg_fun(intern(lit("make-sym"), user_package), func_n1(make_sym)); reg_fun(intern(lit("gensym"), user_package), func_n1o(gensym, 0)); reg_var(gensym_counter_s = intern(lit("*gensym-counter*"), user_package), zero); + reg_var(package_alist_s = intern(lit("*package-alist*"), user_package), packages); reg_var(package_s = intern(lit("*package*"), user_package), user_package_var); reg_fun(intern(lit("make-package"), user_package), func_n1(make_package)); reg_fun(intern(lit("find-package"), user_package), func_n1(find_package)); |