summaryrefslogtreecommitdiff
path: root/Examples/php/value/example.i
blob: 20a4534683e3e3f7a1c49acf2f007c725fcac132 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Tests SWIG's handling of pass-by-value for complex datatypes
%module example

%{
#include "example.h"
%}

%include "example.h"

/* Some helper functions for our interface */
%inline %{

void vector_print(Vector *v) {
  printf("Vector %p = (%g, %g, %g)\n", (void *)v, v->x, v->y, v->z);
}
%}