fix for perl keyword
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8990 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a3f560b1b4
commit
3e7b5d7509
5 changed files with 7 additions and 7 deletions
|
|
@ -8,8 +8,8 @@ public class runme
|
||||||
if (sneaky1.add(30, 2) != 32)
|
if (sneaky1.add(30, 2) != 32)
|
||||||
throw new Exception("add test failed");
|
throw new Exception("add test failed");
|
||||||
|
|
||||||
if (sneaky1.sub(20, 2) != 18)
|
if (sneaky1.subtract(20, 2) != 18)
|
||||||
throw new Exception("sub test failed");
|
throw new Exception("subtract test failed");
|
||||||
|
|
||||||
if (sneaky1.mul(20, 2) != 40)
|
if (sneaky1.mul(20, 2) != 40)
|
||||||
throw new Exception("mul test failed");
|
throw new Exception("mul test failed");
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@ open Swig
|
||||||
open Sneaky1
|
open Sneaky1
|
||||||
|
|
||||||
let x = Sneaky1._add (C_list [ C_int 3; C_int 4 ])
|
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 z = Sneaky1._mul (C_list [ C_int 3; C_int 4 ])
|
||||||
let w = Sneaky1._divide (C_list [ C_int 3; C_int 4 ])
|
let w = Sneaky1._divide (C_list [ C_int 3; C_int 4 ])
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import sneaky1
|
import sneaky1
|
||||||
x = sneaky1.add(3,4)
|
x = sneaky1.add(3,4)
|
||||||
y = sneaky1.sub(3,4)
|
y = sneaky1.subtract(3,4)
|
||||||
z = sneaky1.mul(3,4)
|
z = sneaky1.mul(3,4)
|
||||||
w = sneaky1.divide(3,4)
|
w = sneaky1.divide(3,4)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'sneaky1'
|
require 'sneaky1'
|
||||||
|
|
||||||
x = Sneaky1.add(3, 4)
|
x = Sneaky1.add(3, 4)
|
||||||
y = Sneaky1.sub(3, 4)
|
y = Sneaky1.subtract(3, 4)
|
||||||
z = Sneaky1.mul(3, 4)
|
z = Sneaky1.mul(3, 4)
|
||||||
w = Sneaky1.divide(3, 4)
|
w = Sneaky1.divide(3, 4)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ int add(int x, int y) {
|
||||||
return x+y;
|
return x+y;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sub(int x, int y) {
|
int subtract(int x, int y) {
|
||||||
return x-y;
|
return x-y;
|
||||||
}
|
}
|
||||||
int mul(int x, int y) {
|
int mul(int x, int y) {
|
||||||
|
|
@ -21,7 +21,7 @@ int divide(int x, int y) {
|
||||||
typedef int binop(int,int);
|
typedef int binop(int,int);
|
||||||
%}
|
%}
|
||||||
|
|
||||||
binop add,sub,mul,divide;
|
binop add,subtract,mul,divide;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue