mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 17:20:29 +02:00
* validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New macros. (The NUM names might soon change.) * numbers.h: Added missing declarations.
This commit is contained in:
parent
5437598b36
commit
581ded70a3
3 changed files with 32 additions and 1 deletions
|
@ -116,6 +116,12 @@
|
|||
#define SCM_NUM2ULONG_LONG_DEF(pos, arg, def) \
|
||||
(SCM_UNBNDP (arg) ? def : scm_num2ulong_long (arg, pos, FUNC_NAME))
|
||||
|
||||
#define SCM_NUM2FLOAT(pos, arg) \
|
||||
(scm_num2float (arg, pos, FUNC_NAME))
|
||||
|
||||
#define SCM_NUM2DOUBLE(pos, arg) \
|
||||
(scm_num2double (arg, pos, FUNC_NAME))
|
||||
|
||||
#define SCM_OUT_OF_RANGE(pos, arg) \
|
||||
do { scm_out_of_range_pos (FUNC_NAME, arg, SCM_MAKINUM (pos)); } while (0)
|
||||
|
||||
|
@ -232,6 +238,16 @@
|
|||
cvar = SCM_NUM2LONG (pos, k); \
|
||||
} while (0)
|
||||
|
||||
#define SCM_VALIDATE_FLOAT_COPY(pos, k, cvar) \
|
||||
do { \
|
||||
cvar = SCM_NUM2FLOAT (pos, k); \
|
||||
} while (0)
|
||||
|
||||
#define SCM_VALIDATE_DOUBLE_COPY(pos, k, cvar) \
|
||||
do { \
|
||||
cvar = SCM_NUM2DOUBLE (pos, k); \
|
||||
} while (0)
|
||||
|
||||
#define SCM_VALIDATE_BIGINT(pos, k) SCM_MAKE_VALIDATE (pos, k, BIGP)
|
||||
|
||||
#define SCM_VALIDATE_INUM_MIN(pos, k, min) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue