mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Add SCM_VALIDATE_SIZE_COPY and SCM_NUM2SIZE.
* libguile/validate.h (SCM_VALIDATE_SIZE_COPY, SCM_NUM2SIZE): New macros.
This commit is contained in:
parent
10679f4c59
commit
fdd319e9bd
1 changed files with 7 additions and 0 deletions
|
@ -92,6 +92,8 @@
|
|||
#define SCM_NUM2ULONG_LONG_DEF(pos, arg, def) \
|
||||
(SCM_UNBNDP (arg) ? def : scm_to_ulong_long (arg))
|
||||
|
||||
#define SCM_NUM2SIZE(pos, arg) (scm_to_size_t (arg))
|
||||
|
||||
#define SCM_NUM2FLOAT(pos, arg) ((float) scm_to_double (arg))
|
||||
|
||||
#define SCM_NUM2DOUBLE(pos, arg) (scm_to_double (arg))
|
||||
|
@ -201,6 +203,11 @@
|
|||
cvar = SCM_NUM2LONG (pos, k); \
|
||||
} while (0)
|
||||
|
||||
#define SCM_VALIDATE_SIZE_COPY(pos, k, cvar) \
|
||||
do { \
|
||||
cvar = SCM_NUM2SIZE (pos, k); \
|
||||
} while (0)
|
||||
|
||||
#define SCM_VALIDATE_FLOAT_COPY(pos, k, cvar) \
|
||||
do { \
|
||||
cvar = SCM_NUM2FLOAT (pos, k); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue