summaryrefslogtreecommitdiff
path: root/libguile/generalized-arrays.h
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/generalized-arrays.h')
-rw-r--r--libguile/generalized-arrays.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/libguile/generalized-arrays.h b/libguile/generalized-arrays.h
index cfa69051b..f3d6ddf22 100644
--- a/libguile/generalized-arrays.h
+++ b/libguile/generalized-arrays.h
@@ -3,7 +3,8 @@
#ifndef SCM_GENERALIZED_ARRAYS_H
#define SCM_GENERALIZED_ARRAYS_H
-/* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004, 2006, 2008, 2009, 2013, 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1997,1999-2001,2004,2006,2008-2009,2013-2014,2018
+ * 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
@@ -25,6 +26,7 @@
#include "libguile/__scm.h"
#include "libguile/array-handle.h"
+#include <libguile/error.h>
@@ -32,6 +34,14 @@
*/
+#define SCM_VALIDATE_ARRAY(pos, v) \
+ do { \
+ SCM_ASSERT (SCM_HEAP_OBJECT_P (v) \
+ && scm_is_true (scm_array_p (v, SCM_UNDEFINED)), \
+ v, pos, FUNC_NAME); \
+ } while (0)
+
+
/** Arrays */
SCM_API int scm_is_array (SCM obj);