import source from 1.3.40
[external/swig.git] / Examples / guile / multivalue / example.i
1 /* -*- c -*- */
2
3 %module example;
4
5 %{
6 void divide_l(int a, int b, int *quotient_p, int *remainder_p);
7 void divide_v(int a, int b, int *quotient_p, int *remainder_p);
8 void divide_mv(int a, int b, int *quotient_p, int *remainder_p);
9 %}
10
11 /* Multiple values as lists. By default, if more than one value is to
12 be returned, a list of the values is created and returned; to switch
13 back to this behavior, use: */
14 %values_as_list; 
15
16 void divide_l(int a, int b, int *OUTPUT, int *OUTPUT);
17
18 /* Multiple values as vectors. By issueing: */
19 %values_as_vector;
20 /* vectors instead of lists will be used. */
21
22 void divide_v(int a, int b, int *OUTPUT, int *OUTPUT);
23
24 /* Multiple values for multiple-value continuations.
25    (This is the most elegant way.)  By issueing: */
26 %multiple_values;
27 /* multiple values are passed to the multiple-value
28    continuation, as created by `call-with-values' or the
29    convenience macro `receive'. (See the Scheme file.) */
30
31 void divide_mv(int a, int b, int *OUTPUT, int *OUTPUT);
32