summaryrefslogtreecommitdiff
path: root/libguile/scm_validate.h
diff options
context:
space:
mode:
authorGreg J. Badros <gjb@cs.washington.edu>2000-01-05 16:16:57 +0000
committerGreg J. Badros <gjb@cs.washington.edu>2000-01-05 16:16:57 +0000
commit368cf54d897a35436b65bbc7e451df1493b12697 (patch)
treed8d0539aad856c0c681b8a1f876f17e6aa153816 /libguile/scm_validate.h
parent339999c72ef6e401528e7f8ded4b3e1b63f385e9 (diff)
downloadguile-368cf54d897a35436b65bbc7e451df1493b12697.tar.gz
* unif.c, symbols.c, strings.c, stacks.c, random.c, print.c,
posix.c: Eliminated a bunch of SCM_NIMP(..)s that are now redundant with the safer macros. Patch from Dirk Hermann applied by hand. Thanks Dirk! * scm_validate.h: Added SCM_VALIDATE_VECTOR_OR_DVECTOR for some uses in random.c. * ramap.c: whitespace change.
Diffstat (limited to 'libguile/scm_validate.h')
-rw-r--r--libguile/scm_validate.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libguile/scm_validate.h b/libguile/scm_validate.h
index 3af1c9789..d67f2b780 100644
--- a/libguile/scm_validate.h
+++ b/libguile/scm_validate.h
@@ -1,4 +1,4 @@
-/* $Id: scm_validate.h,v 1.8 1999-12-19 01:04:36 gjb Exp $ */
+/* $Id: scm_validate.h,v 1.9 2000-01-05 16:16:57 gjb Exp $ */
/* Copyright (C) 1999 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@@ -264,6 +264,11 @@
#define SCM_VALIDATE_VECTOR(pos,v) SCM_MAKE_VALIDATE(pos,v,VECTORP)
+#define SCM_VALIDATE_VECTOR_OR_DVECTOR(pos,v) \
+ do { SCM_ASSERT ((SCM_VECTORP (v) || \
+ (SCM_NIMP (v) && SCM_TYP7 (v) == scm_tc7_dvect)), \
+ v, pos, FUNC_NAME); } while (0)
+
#define SCM_VALIDATE_STRUCT(pos,v) SCM_MAKE_VALIDATE(pos,v,STRUCTP)
#define SCM_VALIDATE_VTABLE(pos,v) \