PageRenderTime 34ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/python/contract/example.i

#
Swig | 21 lines | 17 code | 3 blank | 1 comment | 0 complexity | a7b9ad69a3977beb3c3457947f4b485d MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. /* File : example.i */
  2. %module example
  3. %contract gcd(int x, int y) {
  4. require:
  5. x >= 0;
  6. y >= 0;
  7. }
  8. %contract fact(int n) {
  9. require:
  10. n >= 0;
  11. ensure:
  12. fact >= 1;
  13. }
  14. %inline %{
  15. extern int gcd(int x, int y);
  16. extern int fact(int n);
  17. extern double Foo;
  18. %}