Jake
2017-05-18 14:05:49 UTC
I feel like I must just be missing this in the documentation somewhere, but
when a function returns a reference SWIG treats that like a pointer by
default. How do we tell it to treat it as a value (i.e. make a copy and
wrap that)?
For example:
struct Example {
int& get(int x, int y);
};
I want the int copied and not as a SWIG_int_p.
-Jake Cobb
when a function returns a reference SWIG treats that like a pointer by
default. How do we tell it to treat it as a value (i.e. make a copy and
wrap that)?
For example:
struct Example {
int& get(int x, int y);
};
I want the int copied and not as a SWIG_int_p.
-Jake Cobb