guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more validate macros


From: Chris Cramer
Subject: more validate macros
Date: Sat, 18 Aug 2001 21:15:09 -0500
User-agent: Mutt/1.2.5i

There is SCM_VALIDATE_{LONG,ULONG}_COPY but nothing for shorts or ints.
Here's a patch.

Index: libguile/validate.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/validate.h,v
retrieving revision 1.34
diff -u -r1.34 validate.h
--- libguile/validate.h 2001/06/26 10:59:34     1.34
+++ libguile/validate.h 2001/08/19 01:53:17
@@ -199,6 +199,26 @@
     cvar = SCM_INUM (k); \
   } while (0)
 
+#define SCM_VALIDATE_USHORT_COPY(pos, k, cvar) \
+  do { \
+    cvar = SCM_NUM2USHORT (pos, k); \
+  } while (0)
+
+#define SCM_VALIDATE_SHORT_COPY(pos, k, cvar) \
+  do { \
+    cvar = SCM_NUM2SHORT (pos, k); \
+  } while (0)
+
+#define SCM_VALIDATE_UINT_COPY(pos, k, cvar) \
+  do { \
+    cvar = SCM_NUM2UINT (pos, k); \
+  } while (0)
+
+#define SCM_VALIDATE_INT_COPY(pos, k, cvar) \
+  do { \
+    cvar = SCM_NUM2INT (pos, k); \
+  } while (0)
+
 #define SCM_VALIDATE_ULONG_COPY(pos, k, cvar) \
   do { \
     cvar = SCM_NUM2ULONG (pos, k); \

-- 
C. Ray C. aka Christopher Cramer
address@hidden
http://www.pyro.net/~crayc/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]