diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-10 06:57:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-10 06:57:06 -0800 |
commit | 7c2b95c04cd3a0f566d076fa1ac2d8d93721b2ec (patch) | |
tree | 13ffcb7b051d146b71cda49f62ee576b32fac359 /syslog.h | |
parent | a14217b8a4e507a7f75ccc8aa587a44ef0df2414 (diff) | |
download | txr-7c2b95c04cd3a0f566d076fa1ac2d8d93721b2ec.tar.gz txr-7c2b95c04cd3a0f566d076fa1ac2d8d93721b2ec.tar.bz2 txr-7c2b95c04cd3a0f566d076fa1ac2d8d93721b2ec.zip |
Implementing package foreign symbol concept.
* eval.c (eval_init): Register new intrinsics:
package-local-symbols, package-foreign-symbols, use-sym,
unuse-sym, use-package, unuse-package, unintern.
* gc.c (mark_obj): Mark new hidhash member of
struct package.
* lib.c (make_package): Initialize new hidhash
member of struct package.
(lookup_package): New static function.
(find_package): Allow string or symbol argument.
(get_package): New static function.
(delete_package, package_symbols): Use get_package for
flexible package argument; delete_package removes
symbols from other packages via unuse_package.
(package_local_symbols, package_foreign_symbols): New
functions.
(use_sym, unuse_sym): New functions.
(resolve_package_designators): New static function.
(use_package, unuse_package): New functions.
(symbol_present): New static function.
(intern): Revised with get_package for flexible
package argument.
(unintern): New function.
(rehome_sym): Use get_package. Semantics revised.
(obj_print_impl): Use symbol_present function to
determine whether object is visible in *package* and
can be printed without a prefix, rather than naive
home package test.
* lib.h (struct package): New member, hidhash.
(package_local_symbols, package_foreign_symbols, use_sym,
unuse_sym, use_package, unuse_package, unintern): Declared.
* txr.1: Documentation updated. Extended section introducing
the design of packages, and argument conventions. New
functions described. Existing function descriptions revised,
particularly rehome-sym. Missing description of
delete-package added.
Diffstat (limited to 'syslog.h')
0 files changed, 0 insertions, 0 deletions