PageRenderTime 50ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Swig | 32 lines | 12 code | 9 blank | 11 comment | 0 complexity | 9713e3840c12e80945328c8fac740f97 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. /* -*- c -*- */
  2. %module example;
  3. %{
  4. void divide_l(int a, int b, int *quotient_p, int *remainder_p);
  5. void divide_v(int a, int b, int *quotient_p, int *remainder_p);
  6. void divide_mv(int a, int b, int *quotient_p, int *remainder_p);
  7. %}
  8. /* Multiple values as lists. By default, if more than one value is to
  9. be returned, a list of the values is created and returned; to switch
  10. back to this behavior, use: */
  11. %values_as_list;
  12. void divide_l(int a, int b, int *OUTPUT, int *OUTPUT);
  13. /* Multiple values as vectors. By issueing: */
  14. %values_as_vector;
  15. /* vectors instead of lists will be used. */
  16. void divide_v(int a, int b, int *OUTPUT, int *OUTPUT);
  17. /* Multiple values for multiple-value continuations.
  18. (This is the most elegant way.) By issueing: */
  19. %multiple_values;
  20. /* multiple values are passed to the multiple-value
  21. continuation, as created by `call-with-values' or the
  22. convenience macro `receive'. (See the Scheme file.) */
  23. void divide_mv(int a, int b, int *OUTPUT, int *OUTPUT);