fix varout typemaps for swigtypes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8681 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a06eb9c981
commit
8f8673bd2c
3 changed files with 25 additions and 5 deletions
|
|
@ -82,3 +82,19 @@
|
|||
/* Include the unified typemap library */
|
||||
%include <typemaps/swigtypemaps.swg>
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* Perl extra typemaps
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
%typemap(varout,type="$1_descriptor") SWIGTYPE *, SWIGTYPE []
|
||||
"sv_setiv(SvRV($result),(IV) $1);";
|
||||
|
||||
%typemap(varout,type="$1_descriptor") SWIGTYPE &
|
||||
"sv_setiv(SvRV($result),(IV) &$1);";
|
||||
|
||||
%typemap(varout,type="$&1_descriptor") SWIGTYPE
|
||||
"sv_setiv(SvRV($result), (IV) &$1);";
|
||||
|
||||
%typemap(varout,type="$1_descriptor") SWIGTYPE (CLASS::*) {
|
||||
SWIG_MakePackedObj($result, (void *) &$1, sizeof($1_type), $1_descriptor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue