From bc0f2a654bb237f2a4fd5449e16cba1e5ed06997 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 14 Mar 2006 22:07:54 +0000 Subject: [PATCH] fixes for sub is a perl keyword git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9006 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/perl5/pointer/example.c | 2 +- SWIG/Examples/perl5/pointer/example.i | 4 ++-- SWIG/Examples/perl5/pointer/index.html | 2 +- SWIG/Examples/perl5/pointer/runme.pl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SWIG/Examples/perl5/pointer/example.c b/SWIG/Examples/perl5/pointer/example.c index b877d9a5b..8762329fe 100644 --- a/SWIG/Examples/perl5/pointer/example.c +++ b/SWIG/Examples/perl5/pointer/example.c @@ -4,7 +4,7 @@ void add(int *x, int *y, int *result) { *result = *x + *y; } -void sub(int *x, int *y, int *result) { +void subtract(int *x, int *y, int *result) { *result = *x - *y; } diff --git a/SWIG/Examples/perl5/pointer/example.i b/SWIG/Examples/perl5/pointer/example.i index a8ac79499..38c67d7d2 100644 --- a/SWIG/Examples/perl5/pointer/example.i +++ b/SWIG/Examples/perl5/pointer/example.i @@ -3,7 +3,7 @@ %{ extern void add(int *, int *, int *); -extern void sub(int *, int *, int *); +extern void subtract(int *, int *, int *); extern int divide(int, int, int *); %} @@ -18,7 +18,7 @@ extern void add(int *x, int *y, int *result); /* Next we'll use some typemaps */ %include typemaps.i -extern void sub(int *INPUT, int *INPUT, int *OUTPUT); +extern void subtract(int *INPUT, int *INPUT, int *OUTPUT); /* Next we'll use typemaps and the %apply directive */ diff --git a/SWIG/Examples/perl5/pointer/index.html b/SWIG/Examples/perl5/pointer/index.html index 33ba0490a..f37783462 100644 --- a/SWIG/Examples/perl5/pointer/index.html +++ b/SWIG/Examples/perl5/pointer/index.html @@ -131,7 +131,7 @@ that behave as input or output parameters. For example: %apply int *OUTPUT {int *r}; void add(int *x, int *y, int *r); -void sub(int *x, int *y, int *r); +void subtract(int *x, int *y, int *r); void mul(int *x, int *y, int *r); ... etc ... diff --git a/SWIG/Examples/perl5/pointer/runme.pl b/SWIG/Examples/perl5/pointer/runme.pl index 6a9ccef92..4f0a89e82 100644 --- a/SWIG/Examples/perl5/pointer/runme.pl +++ b/SWIG/Examples/perl5/pointer/runme.pl @@ -31,7 +31,7 @@ example::delete_intp($c); # necessary to manufacture pointers. print "Trying the typemap library\n"; -$r = example::sub(37,42); +$r = example::subtract(37,42); print " 37 - 42 = $r\n"; # Now try the version with multiple return values