summaryrefslogtreecommitdiff
path: root/libguile/validate.h
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-08-02 16:14:04 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-08-02 16:14:04 +0000
commitb9bd8526f055eeef0acc42c269eb5ec67546159f (patch)
treef2561facb5d3a08f72839a166e89eda9e7b4136e /libguile/validate.h
parent531bf3e6a84faf61107b4a8a5288a2a757d17c6e (diff)
downloadguile-b9bd8526f055eeef0acc42c269eb5ec67546159f.tar.gz
* 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.
Diffstat (limited to 'libguile/validate.h')
-rw-r--r--libguile/validate.h42
1 files changed, 20 insertions, 22 deletions
diff --git a/libguile/validate.h b/libguile/validate.h
index 18a671e61..04bcb2b85 100644
--- a/libguile/validate.h
+++ b/libguile/validate.h
@@ -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))