/tags/rel-1-3-25/SWIG/Examples/test-suite/namespace_extend.i
# · Swig · 34 lines · 28 code · 6 blank · 0 comment · 0 complexity · 25ee9edde1db2302ffa5f1291d18b23c MD5 · raw file
- %module namespace_extend
- %warnfilter(801) 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);
- };
- };
- }