- rename example modules from "example" to "swigexample", to avoid a warning from shadowing the Octave built-in function "example" - remove deprecated "static" Makefile targets: there is no longer an option to build static Octave modules in the Examples Makefile - emacs whitespace cleanup run on all files
21 lines
262 B
OpenEdge ABL
21 lines
262 B
OpenEdge ABL
/* File : example.i */
|
|
%module swigexample
|
|
|
|
%contract gcd(int x, int y) {
|
|
require:
|
|
x >= 0;
|
|
y >= 0;
|
|
}
|
|
|
|
%contract fact(int n) {
|
|
require:
|
|
n >= 0;
|
|
ensure:
|
|
fact >= 1;
|
|
}
|
|
|
|
%inline %{
|
|
extern int gcd(int x, int y);
|
|
extern int fact(int n);
|
|
extern double Foo;
|
|
%}
|