PageRenderTime 35ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/overload_return_type.i

#
Swig | 23 lines | 16 code | 7 blank | 0 comment | 0 complexity | 213eb45ec43a59bba2d76b70a6c5bfcd MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module overload_return_type
  2. // Regression test for PHP from SF#3168531 (SWIG <= 2.0.1 segfaults).
  3. %inline %{
  4. class A { };
  5. class B {
  6. public:
  7. int foo(int x) { return 0; }
  8. A foo(const char * y) { return A(); }
  9. };
  10. // Regression test for PHP from SF#3208299 (there bar()'s return type wa
  11. // treated as always void).
  12. void foo(int i) {}
  13. int foo() { return 1; }
  14. int bar() { return 1; }
  15. void bar(int i) {}
  16. %}