diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-08-19 07:12:24 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-08-19 07:12:24 -0700 |
commit | fc44a670c11fb653b3600327082eeb8df8b82563 (patch) | |
tree | 97a04b679704c75bbabb1b37cdd52258cd732b6c /lib.h | |
parent | c38f93bc7f763ae776c7e68de120faea169d7f05 (diff) | |
download | txr-fc44a670c11fb653b3600327082eeb8df8b82563.tar.gz txr-fc44a670c11fb653b3600327082eeb8df8b82563.tar.bz2 txr-fc44a670c11fb653b3600327082eeb8df8b82563.zip |
new functions: find-symbol and find-symbol-fb.
Turns out, there is already a find_symbol in lib.c, completely
unused.
* eval.c (eval_init): Register find-symbol and find-symbol-fb
intrinsics.
* lib.c (find_symbol): Fix this hitherto unused function to do
correct defaulting of the package argument and, to accept an
additional argument specifying the not-found value.
(find_symbol_fb): New function.
* lib.c (find_symbol): Declaration updated.
(find_symbol_fb): Declared.
* txr.1: Documented.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -891,7 +891,8 @@ val use_package(val use_list, val package); val unuse_package(val unuse_list, val package); val symbol_visible(val package, val sym); val symbol_needs_prefix(val self, val package, val sym); -val find_symbol(val str, val package); +val find_symbol(val name, val package, val notfound_val); +val find_symbol_fb(val name, val package, val notfound_val); val intern(val str, val package); val unintern(val sym, val package); val rehome_sym(val sym, val package); |