prefer compilers earlier in list
[bpt/guile.git] / libguile / validate.h
index 68ff374..516a6f7 100644 (file)
@@ -4,7 +4,7 @@
 #define SCM_VALIDATE_H
 
 /* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2006, 2007, 2009,
- *   2011, 2012, 2013 Free Software Foundation, Inc.
+ *   2011, 2012, 2013, 2014 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -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))
     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); \
 
 #define SCM_VALIDATE_VECTOR(pos, v) \
   do { \
-    SCM_ASSERT (scm_is_simple_vector (v), v, pos, FUNC_NAME); \
+    SCM_ASSERT (scm_is_vector (v), v, pos, FUNC_NAME); \
   } while (0)
 
 #define SCM_VALIDATE_VECTOR_OR_DVECTOR(pos, v) \
   do { \
-    SCM_ASSERT ((scm_is_simple_vector (v) \
-                || (scm_is_true (scm_f64vector_p (v)))), \
+    SCM_ASSERT (scm_is_vector (v) || scm_is_true (scm_f64vector_p (v)), \
                 v, pos, FUNC_NAME); \
   } while (0)