diff options
author | Mark H Weaver <mhw@netris.org> | 2009-10-27 22:59:22 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-10-27 23:26:30 +0100 |
commit | b02b05332f45fc6ac4f99556cda9fb7ee894e673 (patch) | |
tree | 35ce82c3fadb074f3c2f6e433a0c8a70f48b91d6 /libguile/vm-i-scheme.c | |
parent | 45f4cbdf128c4d3eadcd4bf4571bcc1d61d1039a (diff) | |
download | guile-b02b05332f45fc6ac4f99556cda9fb7ee894e673.tar.gz |
fix nil handling in the vm
* libguile/vm-i-scheme.c (not, not-not): Treat nil as false.
(null?, not-null?): Treat nil as null.
* libguile/vm-i-system.c (br-if, br-if-not): Treat nil as false.
(br-if-null, br-if-not-null): Treat nil as null.
Diffstat (limited to 'libguile/vm-i-scheme.c')
-rw-r--r-- | libguile/vm-i-scheme.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c index b4aadf931..ff963d64c 100644 --- a/libguile/vm-i-scheme.c +++ b/libguile/vm-i-scheme.c @@ -32,13 +32,13 @@ VM_DEFINE_FUNCTION (100, not, "not", 1) { ARGS1 (x); - RETURN (SCM_BOOL (SCM_FALSEP (x))); + RETURN (SCM_BOOL (scm_is_false_or_nil (x))); } VM_DEFINE_FUNCTION (101, not_not, "not-not", 1) { ARGS1 (x); - RETURN (SCM_BOOL (!SCM_FALSEP (x))); + RETURN (SCM_BOOL (!scm_is_false_or_nil (x))); } VM_DEFINE_FUNCTION (102, eq, "eq?", 2) @@ -56,13 +56,13 @@ VM_DEFINE_FUNCTION (103, not_eq, "not-eq?", 2) VM_DEFINE_FUNCTION (104, nullp, "null?", 1) { ARGS1 (x); - RETURN (SCM_BOOL (SCM_NULLP (x))); + RETURN (SCM_BOOL (scm_is_null_or_nil (x))); } VM_DEFINE_FUNCTION (105, not_nullp, "not-null?", 1) { ARGS1 (x); - RETURN (SCM_BOOL (!SCM_NULLP (x))); + RETURN (SCM_BOOL (!scm_is_null_or_nil (x))); } VM_DEFINE_FUNCTION (106, eqv, "eqv?", 2) |