From 87ee6da3659ec29400ad245fa7eac6a39457e316 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 15 Dec 2012 23:56:27 +0000 Subject: [PATCH] Make php example C90 compliant git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13974 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/php/cpointer/example.i | 5 +++++ Examples/php/pointer/example.i | 6 ++++++ Examples/php/simple/example.i | 8 +++----- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Examples/php/cpointer/example.i b/Examples/php/cpointer/example.i index 52e6df190..c61d92858 100644 --- a/Examples/php/cpointer/example.i +++ b/Examples/php/cpointer/example.i @@ -1,6 +1,11 @@ /* File : example.i */ %module example +%{ +extern void add(int *, int *, int *); +extern void sub(int *, int *, int *); +%} + /* This example illustrates a couple of different techniques for manipulating C pointers */ diff --git a/Examples/php/pointer/example.i b/Examples/php/pointer/example.i index c14b94189..1f0059406 100644 --- a/Examples/php/pointer/example.i +++ b/Examples/php/pointer/example.i @@ -1,6 +1,12 @@ /* File : example.i */ %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 for manipulating C pointers */ diff --git a/Examples/php/simple/example.i b/Examples/php/simple/example.i index af4ff08a7..9d4e22aa9 100644 --- a/Examples/php/simple/example.i +++ b/Examples/php/simple/example.i @@ -1,10 +1,8 @@ /* File : example.i */ %module example -%{ - extern double Foo; -%} - +%inline %{ +extern int gcd(int x, int y); extern double Foo; void print_Foo(); -int gcd(int x, int y); +%}