mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 00:30:21 +02:00
nil is false, whee
* libguile/boolean.h (scm_is_false): Recognize nil as false, by default. (scm_is_bool): Recognize nil as a boolean. * libguile/boolean.c (scm_not, scm_boolean, scm_to_bool, scm_is_bool): Adapt to treat nil as false. * libguile/vm-i-system.c (br-if, br-if-not): Just use scm_is_false instead of specifically mentioning nil.
This commit is contained in:
parent
655aadf4b0
commit
d38b431ace
3 changed files with 14 additions and 14 deletions
|
@ -484,12 +484,12 @@ VM_DEFINE_INSTRUCTION (35, br, "br", 3, 0, 0)
|
|||
|
||||
VM_DEFINE_INSTRUCTION (36, br_if, "br-if", 3, 0, 0)
|
||||
{
|
||||
BR (scm_is_true_and_not_nil (*sp));
|
||||
BR (scm_is_true (*sp));
|
||||
}
|
||||
|
||||
VM_DEFINE_INSTRUCTION (37, br_if_not, "br-if-not", 3, 0, 0)
|
||||
{
|
||||
BR (scm_is_false_or_nil (*sp));
|
||||
BR (scm_is_false (*sp));
|
||||
}
|
||||
|
||||
VM_DEFINE_INSTRUCTION (38, br_if_eq, "br-if-eq", 3, 0, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue