PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/guile/multivalue/example.i

#
Swig | 32 lines | 12 code | 9 blank | 11 comment | 0 complexity | 9713e3840c12e80945328c8fac740f97 MD5 | raw file
 1/* -*- c -*- */
 2
 3%module example;
 4
 5%{
 6void divide_l(int a, int b, int *quotient_p, int *remainder_p);
 7void divide_v(int a, int b, int *quotient_p, int *remainder_p);
 8void 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
12be returned, a list of the values is created and returned; to switch
13back to this behavior, use: */
14%values_as_list; 
15
16void 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
22void 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
31void divide_mv(int a, int b, int *OUTPUT, int *OUTPUT);
32