fix for perl keyword

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8990 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-03-07 23:05:11 +00:00
parent cb327f2a58
commit 53ceae6a0a
5 changed files with 7 additions and 7 deletions

View File

@ -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");

View File

@ -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 ])

View File

@ -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)

View File

@ -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)

View File

@ -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;