diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-11-05 19:04:13 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-11-05 19:16:09 +0100 |
commit | 93825c9f0608ec85f17759b7d841927e6cf9f113 (patch) | |
tree | b914030af965dd953da3a95f2fdf7ab9532f0738 /libguile/validate.h | |
parent | b29b2c87b4cd220868c787fd39a9b42fbf9602ef (diff) | |
download | guile-93825c9f0608ec85f17759b7d841927e6cf9f113.tar.gz |
Have `SCM_NUM2FLOAT' and `SCM_NUM2DOUBLE' use `scm_to_double'.
* libguile/validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE): Use
`scm_to_double' instead of the deprecated functions. Reported by
Aleix Conchillo Flaqué <aconchillo@gmail.com>.
Diffstat (limited to 'libguile/validate.h')
-rw-r--r-- | libguile/validate.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libguile/validate.h b/libguile/validate.h index b0e502a1c..0bdc057f9 100644 --- a/libguile/validate.h +++ b/libguile/validate.h @@ -3,7 +3,8 @@ #ifndef SCM_VALIDATE_H #define SCM_VALIDATE_H -/* Copyright (C) 1999,2000,2001, 2002, 2004, 2006, 2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2006, 2007, 2009, + * 2012 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -91,11 +92,9 @@ #define SCM_NUM2ULONG_LONG_DEF(pos, arg, def) \ (SCM_UNBNDP (arg) ? def : scm_to_ulong_long (arg)) -#define SCM_NUM2FLOAT(pos, arg) \ - (scm_num2float (arg, pos, FUNC_NAME)) +#define SCM_NUM2FLOAT(pos, arg) ((float) scm_to_double (arg)) -#define SCM_NUM2DOUBLE(pos, arg) \ - (scm_num2double (arg, pos, FUNC_NAME)) +#define SCM_NUM2DOUBLE(pos, arg) (scm_to_double (arg)) #define SCM_OUT_OF_RANGE(pos, arg) \ do { scm_out_of_range_pos (FUNC_NAME, arg, scm_from_int (pos)); } while (0) |