swig/Examples/c/reference/example.cxx
2008-07-01 10:30:40 +00:00

19 lines
347 B
C++

#include <stdio.h>
#include "example.h"
void foo_by_val(Bar bar) {
bar.set(123);
printf("inside foo_by_val: %d\n", bar.get());
}
void foo_by_ref(Bar& bar) {
bar.set(123);
printf("inside foo_by_ref: %d\n", bar.get());
}
void foo_by_ptr(Bar* bar) {
bar->set(123);
printf("inside foo_by_ptr: %d\n", bar->get());
}