diff options
author | Mark H Weaver <mhw@netris.org> | 2012-01-18 17:52:43 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2012-01-18 18:01:48 -0500 |
commit | 1ceeca0a76809248aa974685756e0f05c7f64200 (patch) | |
tree | 558633a5b8f7fc66388f35609d1dfa537a749c88 /doc/ref/api-control.texi | |
parent | f0007cade095c5a2878ebbb8ea8c9b40810e4509 (diff) | |
download | guile-1ceeca0a76809248aa974685756e0f05c7f64200.tar.gz |
Add `scm_c_value_ref' to allow access to multiple returned values from C
Based on a patch by Julian Graham <julian@member.fsf.org>
* libguile/values.c, libguile/values.h (scm_c_value_ref): New function.
* doc/ref/api-control.texi (Multiple Values): Add documentation.
* test-suite/standalone/test-scm-values.c: New test program.
* test-suite/standalone/Makefile.am: Add test-scm-values test.
Diffstat (limited to 'doc/ref/api-control.texi')
-rw-r--r-- | doc/ref/api-control.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index c1502b032..559677874 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -785,6 +785,13 @@ 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) +Returns the value at the position specified by @var{idx} in +@var{values}. Note that @var{values} 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 + @rnindex call-with-values @deffn {Scheme Procedure} call-with-values producer consumer Calls its @var{producer} argument with no values and a |