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:
Marcelo Matus 2006-02-02 21:31:19 +00:00
commit 8f8673bd2c
3 changed files with 25 additions and 5 deletions

View file

@ -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);
}