add missing directorin typemaps

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7438 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-09-14 14:36:57 +00:00
commit 474752667e
2 changed files with 20 additions and 1 deletions

View file

@ -25,6 +25,7 @@ public:
virtual void foo_meth_ref(Foo_int &, int);
virtual void foo_meth_ptr(Foo_int *, int);
virtual void foo_meth_val(Foo_int, int);
virtual void foo_meth_cref(const Foo_int &, int);
};
Bar::~Bar()
@ -39,6 +40,7 @@ Bar::meth()
void Bar::foo_meth_ref(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_cref(const Foo_int &arg, int param) { }
%}
%template(Foo_integers) Foo<int>;

View file

@ -281,7 +281,24 @@
* --- Director typemaps --- *
* ----------------------------------------------------------------------------- */
/* director in not needed, see python.cxx */
/* directorin */
%typemap(directorin) SWIGTYPE* {
$input = SWIG_NewPointerObj(SWIG_static_cast(SWIG_static_cast($1_name, $1_ltype), void*), $descriptor, 0);
}
%typemap(directorin) SWIGTYPE {
$input = SWIG_NewPointerObj(SWIG_static_cast(SWIG_static_cast(&$1_name, $&1_ltype), void*), $descriptor, 0);
}
%typemap(directorin) SWIGTYPE& {
$input = SWIG_NewPointerObj(SWIG_static_cast(SWIG_static_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 */