/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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- %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);
- };
- };
- }