summaryrefslogtreecommitdiff
path: root/libguile/strings.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-06-18 09:44:35 +0200
committerAndy Wingo <wingo@pobox.com>2018-06-18 09:44:35 +0200
commit8a6f46ee96e0946e539e3a33c95c3228b63e9fb3 (patch)
tree6df1b84f414e46add11e2329f89f15d26a647752 /libguile/strings.h
parentbe18b507735ccb6006dcd9a58cba7119b43b7d7c (diff)
downloadguile-8a6f46ee96e0946e539e3a33c95c3228b63e9fb3.tar.gz
More validate.h devolution
* libguile/validate.h: * libguile/alist.h (SCM_VALIDATE_ALISTCELL, SCM_VALIDATE_ALISTCELL_COPYSCM) * libguile/bytevectors.h (SCM_VALIDATE_BYTEVECTOR) * libguile/chars.h (SCM_VALIDATE_CHAR, SCM_VALIDATE_CHAR_COPY): * libguile/print.h (SCM_VALIDATE_OPORT_VALUE, SCM_VALIDATE_PRINTSTATE): * libguile/procs.h (SCM_VALIDATE_THUNK) * libguile/smob.h (SCM_VALIDATE_SMOB) * libguile/strings.h (SCM_VALIDATE_STRING): Devolve these macros from validate.h.
Diffstat (limited to 'libguile/strings.h')
-rw-r--r--libguile/strings.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/libguile/strings.h b/libguile/strings.h
index 5b3e7805f..8e97eb545 100644
--- a/libguile/strings.h
+++ b/libguile/strings.h
@@ -3,8 +3,8 @@
#ifndef SCM_STRINGS_H
#define SCM_STRINGS_H
-/* Copyright (C) 1995-1998, 2000, 2001, 2004-2006, 2008-2011, 2013,
- * 2015-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1998,2000-2001,2004-2006,2008-2011,2013,
+ * 2015-2016,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 +25,7 @@
#include "libguile/__scm.h"
+#include <libguile/error.h>
@@ -247,6 +248,15 @@ SCM_API SCM scm_sys_stringbuf_hist (void);
#endif
+
+
+#define SCM_VALIDATE_STRING(pos, str) \
+ do { \
+ SCM_ASSERT_TYPE (scm_is_string (str), str, pos, FUNC_NAME, "string"); \
+ } while (0)
+
+
+
SCM_INTERNAL void scm_init_strings (void);