Updated examples to function correctly with new php4 module. Added
some supplemental examples for cpointer, overloading and references using proxies. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7391 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e2379c2b28
commit
522ab32693
44 changed files with 506 additions and 131 deletions
|
|
@ -6,10 +6,8 @@ double dot_product(Vector a, Vector b) {
|
|||
return (a.x*b.x + a.y*b.y + a.z*b.z);
|
||||
}
|
||||
|
||||
Vector vector_add(Vector a, Vector b) {
|
||||
Vector r;
|
||||
r.x = a.x + b.x;
|
||||
r.y = a.y + b.y;
|
||||
r.z = a.z + b.z;
|
||||
return r;
|
||||
void vector_add(Vector a, Vector b, Vector* result) {
|
||||
result->x = a.x + b.x;
|
||||
result->y = a.y + b.y;
|
||||
result->z = a.z + b.z;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue