diff options
Diffstat (limited to 'doc/ref/api-control.texi')
-rw-r--r-- | doc/ref/api-control.texi | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index 6eac8726f..d8b6a45ad 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -841,12 +841,27 @@ the current implementation that object shares structure with @var{args}, so @var{args} should not be modified subsequently. @end deffn -@deffn {C Function} scm_c_value_ref (values, idx) +@deftypefn {C Function} SCM scm_c_values (SCM *base, size_t n) +@code{scm_c_values} is an alternative to @code{scm_values}. It creates +a new values object, and copies into it the @var{n} values starting from +@var{base}. + +Currently this creates a list and passes it to @code{scm_values}, but we +expect that in the future we will be able to use more a efficient +representation. +@end deftypefn + +@deftypefn {C Function} size_t scm_c_nvalues (SCM obj) +If @var{obj} is a multiple-values object, returns the number of values +it contains. Otherwise returns 1. +@end deftypefn + +@deftypefn {C Function} SCM scm_c_value_ref (SCM obj, size_t idx) Returns the value at the position specified by @var{idx} in -@var{values}. Note that @var{values} will ordinarily be a +@var{obj}. Note that @var{obj} will ordinarily be a multiple-values object, but it need not be. Any other object represents a single value (itself), and is handled appropriately. -@end deffn +@end deftypefn @rnindex call-with-values @deffn {Scheme Procedure} call-with-values producer consumer |