From 53ceae6a0ab81482371e8ca29a4bd677606192ff Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 7 Mar 2006 23:05:11 +0000 Subject: [PATCH] fix for perl keyword git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8990 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/csharp/sneaky1_runme.cs | 4 ++-- Examples/test-suite/ocaml/sneaky1_runme.ml | 2 +- Examples/test-suite/python/sneaky1_runme.py | 2 +- Examples/test-suite/ruby/sneaky1_runme.rb | 2 +- Examples/test-suite/sneaky1.i | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Examples/test-suite/csharp/sneaky1_runme.cs b/Examples/test-suite/csharp/sneaky1_runme.cs index 25d1c5dee..07e25700d 100644 --- a/Examples/test-suite/csharp/sneaky1_runme.cs +++ b/Examples/test-suite/csharp/sneaky1_runme.cs @@ -8,8 +8,8 @@ public class runme if (sneaky1.add(30, 2) != 32) throw new Exception("add test failed"); - if (sneaky1.sub(20, 2) != 18) - throw new Exception("sub test failed"); + if (sneaky1.subtract(20, 2) != 18) + throw new Exception("subtract test failed"); if (sneaky1.mul(20, 2) != 40) throw new Exception("mul test failed"); diff --git a/Examples/test-suite/ocaml/sneaky1_runme.ml b/Examples/test-suite/ocaml/sneaky1_runme.ml index c03599bf7..81b69f372 100644 --- a/Examples/test-suite/ocaml/sneaky1_runme.ml +++ b/Examples/test-suite/ocaml/sneaky1_runme.ml @@ -4,6 +4,6 @@ open Swig open Sneaky1 let x = Sneaky1._add (C_list [ C_int 3; C_int 4 ]) -let y = Sneaky1._sub (C_list [ C_int 3; C_int 4 ]) +let y = Sneaky1._subtract (C_list [ C_int 3; C_int 4 ]) let z = Sneaky1._mul (C_list [ C_int 3; C_int 4 ]) let w = Sneaky1._divide (C_list [ C_int 3; C_int 4 ]) diff --git a/Examples/test-suite/python/sneaky1_runme.py b/Examples/test-suite/python/sneaky1_runme.py index 7823e77ea..9c2c32f85 100644 --- a/Examples/test-suite/python/sneaky1_runme.py +++ b/Examples/test-suite/python/sneaky1_runme.py @@ -1,5 +1,5 @@ import sneaky1 x = sneaky1.add(3,4) -y = sneaky1.sub(3,4) +y = sneaky1.subtract(3,4) z = sneaky1.mul(3,4) w = sneaky1.divide(3,4) diff --git a/Examples/test-suite/ruby/sneaky1_runme.rb b/Examples/test-suite/ruby/sneaky1_runme.rb index 731e27b97..84065b0e2 100755 --- a/Examples/test-suite/ruby/sneaky1_runme.rb +++ b/Examples/test-suite/ruby/sneaky1_runme.rb @@ -1,6 +1,6 @@ require 'sneaky1' x = Sneaky1.add(3, 4) -y = Sneaky1.sub(3, 4) +y = Sneaky1.subtract(3, 4) z = Sneaky1.mul(3, 4) w = Sneaky1.divide(3, 4) diff --git a/Examples/test-suite/sneaky1.i b/Examples/test-suite/sneaky1.i index bacf4a978..2d915e102 100644 --- a/Examples/test-suite/sneaky1.i +++ b/Examples/test-suite/sneaky1.i @@ -5,7 +5,7 @@ int add(int x, int y) { return x+y; } -int sub(int x, int y) { +int subtract(int x, int y) { return x-y; } int mul(int x, int y) { @@ -21,7 +21,7 @@ int divide(int x, int y) { typedef int binop(int,int); %} -binop add,sub,mul,divide; +binop add,subtract,mul,divide;