diff options
author | Mark H Weaver <mhw@netris.org> | 2011-03-01 12:46:38 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2011-03-08 17:50:47 -0500 |
commit | 73ea546c51c5ca531cc6040eb37e292a8334b33e (patch) | |
tree | 3330e4fa573d22b73216f84767604981fac316ce /libguile/bytevectors.c | |
parent | 831e6782bfa776c30286ef14f1356b9d5aa8f1ee (diff) | |
download | guile-73ea546c51c5ca531cc6040eb37e292a8334b33e.tar.gz |
Fix bytevectors VALIDATE_REAL to test for reals, not rationals
Reported and fixed by Daniel Llorens <dll@bluewin.ch>.
* libguile/bytevectors.c (VALIDATE_REAL): Test for reals, not rationals.
* test-suite/tests/srfi-4.test (f32 vectors, f64 vectors): Add tests.
Diffstat (limited to 'libguile/bytevectors.c')
-rw-r--r-- | libguile/bytevectors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index f01469774..a969e3bb4 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -1667,7 +1667,7 @@ double_from_foreign_endianness (const union scm_ieee754_double *source) /* FIXME: SCM_VALIDATE_REAL rejects integers, etc. grrr */ #define VALIDATE_REAL(pos, v) \ do { \ - SCM_ASSERT_TYPE (scm_is_true (scm_rational_p (v)), v, pos, FUNC_NAME, "real"); \ + SCM_ASSERT_TYPE (scm_is_real (v), v, pos, FUNC_NAME, "real"); \ } while (0) /* Templace getters and setters. */ |