diff options
author | Mike Gran <spk121@yahoo.com> | 2011-10-08 17:12:12 -0700 |
---|---|---|
committer | Mike Gran <spk121@yahoo.com> | 2011-10-08 17:12:12 -0700 |
commit | b2c4c3e5e315c64a5978d1c5918e9063cd92ada8 (patch) | |
tree | 8a19825a8499ea6a3ab7b766b3e77d8bf37b4575 /doc/ref/api-control.texi | |
parent | 41d43584f2175e22e3380ae1553a3415dae711fc (diff) | |
download | guile-b2c4c3e5e315c64a5978d1c5918e9063cd92ada8.tar.gz |
Document SCM_ASSERT_TYPE and SCM_ASRTGO macros
* doc/ref/api-control.texi (Signalling Type Errors): document macros
Diffstat (limited to 'doc/ref/api-control.texi')
-rw-r--r-- | doc/ref/api-control.texi | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index 9f741fd7b..ad36806f1 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -1636,9 +1636,13 @@ causing a segmentation fault. Guile provides some macros to make this easier. @deftypefn Macro void SCM_ASSERT (int @var{test}, SCM @var{obj}, unsigned int @var{position}, const char *@var{subr}) +@deftypefnx Macro void SCM_ASSERT_TYPE (int @var{test}, SCM @var{obj}, unsigned int @var{position}, const char *@var{subr}, const char *@var{expected}) If @var{test} is zero, signal a ``wrong type argument'' error, attributed to the subroutine named @var{subr}, operating on the value @var{obj}, which is the @var{position}'th argument of @var{subr}. + +In @code{SCM_ASSERT_TYPE}, @var{expected} is a C string describing the +type of argument that was expected. @end deftypefn @deftypefn Macro int SCM_ARG1 @@ -1663,6 +1667,13 @@ leave it unspecified which argument's type is incorrect. Again, @code{SCM_ARGn} should be preferred over a raw zero constant. @end deftypefn +The @code{SCM_ASRTGO} macro provides another strategy for handling +incorrect types. + +@deftypefn Macro void SCM_ASRTGO (int @var{test}, label) +If @var{test} is zero, use @code{goto} to jump to the given @var{label}. +@var{label} must appear within the current function. +@end deftypefn @node Continuation Barriers @subsection Continuation Barriers |