/trunk/Examples/python/contract/example.i
# · Swig · 21 lines · 17 code · 3 blank · 1 comment · 0 complexity · a7b9ad69a3977beb3c3457947f4b485d MD5 · raw file
- /* File : example.i */
- %module example
- %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;
- %}