diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-12-11 07:23:01 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-12-11 07:23:01 -0800 |
commit | 6fbedee8d28ed964ef6b9eb8b01fd0911d99c9ff (patch) | |
tree | 6b3eb09a3665a123a66d3b24e607d6ae307acbc9 /lib.h | |
parent | 1ca65fef46ca68ca18e3db5a5eac316d5cf25799 (diff) | |
download | txr-6fbedee8d28ed964ef6b9eb8b01fd0911d99c9ff.tar.gz txr-6fbedee8d28ed964ef6b9eb8b01fd0911d99c9ff.tar.bz2 txr-6fbedee8d28ed964ef6b9eb8b01fd0911d99c9ff.zip |
Method lookup doesn't throw on nonexistent slots.
* eval.c (lookup_fun): When looking up (meth ...) syntax,
avoid calling static_slot with a slot argument which isn't
a static slot of the given type, otherwise an exception
is thrown. The situation is turned instead into a nil
return which just indicates "no binding". This allows,
for instance, (fboundp '(meth foo bar)) to be safe.
It makes no sense for that to return nil if foo
doesn't name a struct type, but to throw an error if
bar isn't a static slot in foo.
Diffstat (limited to 'lib.h')
0 files changed, 0 insertions, 0 deletions