 used, SWIG converts
all pass-by-value functions into wrappers that pass by reference.  For example:

<blockquote>
<pre>
double dot_product(Vector a, Vector b);
</pre>
</blockquote>

gets turned into a wrapper like this:

<blockquote>
<pre>
double wrap_dot_product(Vector *a, Vector *b) {
     return dot_product(*a,*b);
}
</pre>
</blockquote>

Functions that return by value require a memory allocation to store the result. For example:

<blockquote>
<pre>
Vector cross_product(Vector *a, Vector *b);
</pre>
</b