Make php example C90 compliant
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13974 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6f819d1cd1
commit
87ee6da365
3 changed files with 14 additions and 5 deletions
|
|
@ -1,6 +1,11 @@
|
||||||
/* File : example.i */
|
/* File : example.i */
|
||||||
%module example
|
%module example
|
||||||
|
|
||||||
|
%{
|
||||||
|
extern void add(int *, int *, int *);
|
||||||
|
extern void sub(int *, int *, int *);
|
||||||
|
%}
|
||||||
|
|
||||||
/* This example illustrates a couple of different techniques
|
/* This example illustrates a couple of different techniques
|
||||||
for manipulating C pointers */
|
for manipulating C pointers */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
/* File : example.i */
|
/* File : example.i */
|
||||||
%module example
|
%module example
|
||||||
|
|
||||||
|
%{
|
||||||
|
extern void add(double *, double *, double *);
|
||||||
|
extern void sub(int *, int *, int *);
|
||||||
|
extern int divide(int, int, int *);
|
||||||
|
%}
|
||||||
|
|
||||||
/* This example illustrates a couple of different techniques
|
/* This example illustrates a couple of different techniques
|
||||||
for manipulating C pointers */
|
for manipulating C pointers */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
/* File : example.i */
|
/* File : example.i */
|
||||||
%module example
|
%module example
|
||||||
|
|
||||||
%{
|
%inline %{
|
||||||
extern double Foo;
|
extern int gcd(int x, int y);
|
||||||
%}
|
|
||||||
|
|
||||||
extern double Foo;
|
extern double Foo;
|
||||||
void print_Foo();
|
void print_Foo();
|
||||||
int gcd(int x, int y);
|
%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue