1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

* numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,

scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num,
scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long,
scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num,
scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long):
Discouraged by moving to discouraged.h and discouraged.c and
reimplementing in terms of scm_from_* and scm_to_*.  Changed all uses
to the new scm_from_* and scm_to_* functions.
This commit is contained in:
Marius Vollmer 2004-08-02 16:14:04 +00:00
parent 531bf3e6a8
commit b9bd8526f0
28 changed files with 232 additions and 221 deletions

View file

@ -40,57 +40,55 @@
#define SCM_WRONG_TYPE_ARG(pos, obj) \
do { scm_wrong_type_arg (FUNC_NAME, pos, obj); } while (0)
#define SCM_NUM2SIZE(pos, arg) (scm_num2size (arg, pos, FUNC_NAME))
#define SCM_NUM2SIZE(pos, arg) (scm_to_size_t (arg))
#define SCM_NUM2SIZE_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2size (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_size_t (arg))
#define SCM_NUM2PTRDIFF(pos, arg) (scm_num2ptrdiff (arg, pos, FUNC_NAME))
#define SCM_NUM2PTRDIFF(pos, arg) (scm_to_ssize_t (arg))
#define SCM_NUM2PTRDIFF_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2ptrdiff (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_ssize_t (arg))
#define SCM_NUM2SHORT(pos, arg) (scm_num2short (arg, pos, FUNC_NAME))
#define SCM_NUM2SHORT(pos, arg) (scm_to_short (arg))
#define SCM_NUM2SHORT_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2short (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_short (arg))
#define SCM_NUM2USHORT(pos, arg) (scm_num2ushort (arg, pos, FUNC_NAME))
#define SCM_NUM2USHORT(pos, arg) (scm_to_ushort (arg))
#define SCM_NUM2USHORT_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2ushort (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_ushort (arg))
#define SCM_NUM2INT(pos, arg) (scm_num2int (arg, pos, FUNC_NAME))
#define SCM_NUM2INT(pos, arg) (scm_to_int (arg))
#define SCM_NUM2INT_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2int (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_int (arg))
#define SCM_NUM2UINT(pos, arg) (scm_num2uint (arg, pos, FUNC_NAME))
#define SCM_NUM2UINT(pos, arg) (scm_to_uint (arg))
#define SCM_NUM2UINT_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2uint (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_uint (arg))
#define SCM_NUM2ULONG(pos, arg) (scm_num2ulong (arg, pos, FUNC_NAME))
#define SCM_NUM2ULONG(pos, arg) (scm_to_ulong (arg))
#define SCM_NUM2ULONG_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2ulong (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_ulong (arg))
#define SCM_NUM2LONG(pos, arg) (scm_num2long (arg, pos, FUNC_NAME))
#define SCM_NUM2LONG(pos, arg) (scm_to_long (arg))
#define SCM_NUM2LONG_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2long (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_long (arg))
#define SCM_NUM2LONG_LONG(pos, arg) \
(scm_num2long_long (arg, pos, FUNC_NAME))
#define SCM_NUM2LONG_LONG(pos, arg) (scm_to_long_long (arg))
#define SCM_NUM2LONG_LONG_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2long_long (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_long_long (arg))
#define SCM_NUM2ULONG_LONG(pos, arg) \
(scm_num2ulong_long (arg, pos, FUNC_NAME))
#define SCM_NUM2ULONG_LONG(pos, arg) (scm_to_ulong_long (arg))
#define SCM_NUM2ULONG_LONG_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_num2ulong_long (arg, pos, FUNC_NAME))
(SCM_UNBNDP (arg) ? def : scm_to_ulong_long (arg))
#define SCM_NUM2FLOAT(pos, arg) \
(scm_num2float (arg, pos, FUNC_NAME))