Some changes to generated proxy .c and .h file.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10522 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a36f790271
commit
d828791f56
4 changed files with 92 additions and 24 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/* File : example.c */
|
||||
|
||||
/* A global variable */
|
||||
/* double Foo = 3.0; */
|
||||
double Foo = 3.0;
|
||||
|
||||
/* Compute the greatest common divisor of positive integers */
|
||||
int gcd(int x, int y) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* File : example.i */
|
||||
%module example
|
||||
|
||||
%feature("prepend") {
|
||||
printf("Testing...\n");
|
||||
}
|
||||
|
||||
%inline %{
|
||||
extern double Foo;
|
||||
extern int gcd(int x, int y);
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "example_proxy.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int a = 35;
|
||||
int b = 15;
|
||||
printf("GCD(%d, %d)=%d", a, b, gcd(a, b));
|
||||
printf("Foo is %f\n", Foo);
|
||||
printf("GCD(%d, %d)=%d\n", a, b, gcd(a, b));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue