summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-08-19 07:12:24 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-08-19 07:12:24 -0700
commitfc44a670c11fb653b3600327082eeb8df8b82563 (patch)
tree97a04b679704c75bbabb1b37cdd52258cd732b6c /lib.h
parentc38f93bc7f763ae776c7e68de120faea169d7f05 (diff)
downloadtxr-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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib.h b/lib.h
index c7296b7b..c22e9890 100644
--- a/lib.h
+++ b/lib.h
@@ -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);