summaryrefslogtreecommitdiff
path: root/Examples/test-suite/namespace_extend.i
blob: 3c414d1af3d8df1c8877230c2a2763f2b8c17c25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%module namespace_extend

%warnfilter(SWIGWARN_RUBY_WRONG_NAME) bar; /* Ruby, wrong class name */

%{
namespace foo {
   class bar {
   public:
   };
}
foo::bar *new_foo_bar() {
   return new foo::bar;
}
void     delete_foo_bar(foo::bar *self) {
   delete self;
}
int foo_bar_blah(foo::bar *self, int x) {
   return x;
}
%}

namespace foo {
    class bar {
    public:
    %extend {
        bar();
       ~bar();
        int blah(int x);
    };
  };
}