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

# · Swig · 19 lines · 10 code · 4 blank · 5 comment · 0 complexity · 9687eb14be130e61dfe72eae003c21cc MD5 · raw file

  1. %module protected_rename
  2. /**
  3. * We should be able to rename Foo::y() to 'x' since the protected
  4. * member variable of the same name is not wrapped. Thus this test
  5. * case shouldn't generate any warnings.
  6. */
  7. %rename(x) Foo::y();
  8. %inline %{
  9. class Foo {
  10. protected:
  11. int x;
  12. public:
  13. void y() {}
  14. };
  15. %}