diff options
author | Andy Wingo <wingo@pobox.com> | 2018-06-18 09:44:35 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-06-18 09:44:35 +0200 |
commit | 8a6f46ee96e0946e539e3a33c95c3228b63e9fb3 (patch) | |
tree | 6df1b84f414e46add11e2329f89f15d26a647752 /libguile/procs.h | |
parent | be18b507735ccb6006dcd9a58cba7119b43b7d7c (diff) | |
download | guile-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/procs.h')
-rw-r--r-- | libguile/procs.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libguile/procs.h b/libguile/procs.h index c4c78f23e..51ae441f3 100644 --- a/libguile/procs.h +++ b/libguile/procs.h @@ -4,7 +4,7 @@ #define SCM_PROCS_H /* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2006, 2008, 2009, - * 2012, 2013 Free Software Foundation, Inc. + * 2012, 2013, 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,9 +25,15 @@ #include "libguile/__scm.h" +#include <libguile/error.h> +#define SCM_VALIDATE_THUNK(pos, thunk) \ + do { \ + SCM_ASSERT (scm_is_true (scm_thunk_p (thunk)), thunk, pos, FUNC_NAME); \ + } while (0) + SCM_API SCM scm_procedure_p (SCM obj); SCM_API SCM scm_thunk_p (SCM obj); SCM_API SCM scm_procedure_with_setter_p (SCM obj); |