/trunk/Examples/php/value/example.i

# · Swig · 17 lines · 11 code · 5 blank · 1 comment · 0 complexity · 474d98123276b2f87e73856a50f93a1c MD5 · raw file

  1. // Tests SWIG's handling of pass-by-value for complex datatypes
  2. %module example
  3. %{
  4. #include "example.h"
  5. %}
  6. %include "example.h"
  7. /* Some helper functions for our interface */
  8. %inline %{
  9. void vector_print(Vector *v) {
  10. printf("Vector %p = (%g, %g, %g)\n", v, v->x, v->y, v->z);
  11. }
  12. %}