swig/Examples/perl5/pointer/example.c
William S Fulton 6e5ed937ec fixes for sub is a perl keyword
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9006 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-14 22:07:54 +00:00

16 lines
246 B
C

/* File : example.c */
void add(int *x, int *y, int *result) {
*result = *x + *y;
}
void subtract(int *x, int *y, int *result) {
*result = *x - *y;
}
int divide(int n, int d, int *r) {
int q;
q = n/d;
*r = n - q*d;
return q;
}