add missing const ptr case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7534 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8802ee4035
commit
37b7e6133e
2 changed files with 7 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ public:
|
||||||
virtual void foo_meth_ptr(Foo_int *, int);
|
virtual void foo_meth_ptr(Foo_int *, int);
|
||||||
virtual void foo_meth_val(Foo_int, int);
|
virtual void foo_meth_val(Foo_int, int);
|
||||||
virtual void foo_meth_cref(const Foo_int &, int);
|
virtual void foo_meth_cref(const Foo_int &, int);
|
||||||
|
virtual void foo_meth_cptr(const Foo_int *, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
Bar::~Bar()
|
Bar::~Bar()
|
||||||
|
|
@ -41,6 +42,7 @@ void Bar::foo_meth_ref(Foo_int &arg, int param) { }
|
||||||
void Bar::foo_meth_ptr(Foo_int *arg, int param) { }
|
void Bar::foo_meth_ptr(Foo_int *arg, int param) { }
|
||||||
void Bar::foo_meth_val(Foo_int arg, int param) { }
|
void Bar::foo_meth_val(Foo_int arg, int param) { }
|
||||||
void Bar::foo_meth_cref(const Foo_int &arg, int param) { }
|
void Bar::foo_meth_cref(const Foo_int &arg, int param) { }
|
||||||
|
void Bar::foo_meth_cptr(const Foo_int *arg, int param) { }
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%template(Foo_integers) Foo<int>;
|
%template(Foo_integers) Foo<int>;
|
||||||
|
|
|
||||||
|
|
@ -295,10 +295,15 @@
|
||||||
$input = SWIG_NewPointerObj(SWIG_static_cast(SWIG_static_cast(&$1_name, $1_ltype), void*), $descriptor, 0);
|
$input = SWIG_NewPointerObj(SWIG_static_cast(SWIG_static_cast(&$1_name, $1_ltype), void*), $descriptor, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* the const cases */
|
||||||
%typemap(directorin) SWIGTYPE const& {
|
%typemap(directorin) SWIGTYPE const& {
|
||||||
$input = SWIG_NewPointerObj(SWIG_static_cast(SWIG_const_cast(&$1_name, $1_ltype), void*), $descriptor, 0);
|
$input = SWIG_NewPointerObj(SWIG_static_cast(SWIG_const_cast(&$1_name, $1_ltype), void*), $descriptor, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%typemap(directorin) SWIGTYPE const* {
|
||||||
|
$input = SWIG_NewPointerObj(SWIG_static_cast(SWIG_const_cast($1_name, $1_ltype), void*), $descriptor, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* directorout */
|
/* directorout */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue