diff options
Diffstat (limited to 'Examples/php/value/example.i')
-rw-r--r-- | Examples/php/value/example.i | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Examples/php/value/example.i b/Examples/php/value/example.i new file mode 100644 index 0000000..386fa3b --- /dev/null +++ b/Examples/php/value/example.i @@ -0,0 +1,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", v, v->x, v->y, v->z); +} +%} + |