1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +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:
Mikael Djurfeldt 2001-09-23 21:25:26 +00:00
parent 5437598b36
commit 581ded70a3
3 changed files with 32 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
* 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.
2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
* Makefile.am: Distribute num2float.i.c.

View file

@ -325,9 +325,16 @@ extern SCM scm_ulong_long2num (unsigned long long sl);
extern long long scm_num2long_long (SCM num, unsigned long int pos,
const char *s_caller);
extern unsigned long long scm_num2ulong_long (SCM num, unsigned long int pos,
const char *s_caller);
const char *s_caller);
#endif
extern SCM scm_float2num (float n);
extern SCM scm_double2num (double n);
extern float scm_num2float (SCM num, unsigned long int pos,
const char *s_caller);
extern double scm_num2double (SCM num, unsigned long int pos,
const char *s_caller);
extern void scm_init_numbers (void);
#endif /* SCM_NUMBERS_H */

View file

@ -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) \