Fixes to SWIGTYPE& varin and varout typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4263 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5e5d35c199
commit
11dd5c2195
1 changed files with 14 additions and 3 deletions
|
|
@ -225,12 +225,20 @@
|
|||
%typemap(varin) long long "$1 = (long long) strtoll(SvPV($input, PL_na), 0, 0);";
|
||||
%typemap(varin) unsigned long long "$1 = (unsigned long long) strtoull(SvPV($input, PL_na), 0, 0);";
|
||||
|
||||
%typemap(varin) SWIGTYPE *, SWIGTYPE [], SWIGTYPE & {
|
||||
if (SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0) < 0) {
|
||||
%typemap(varin) SWIGTYPE *, SWIGTYPE [] {
|
||||
if (SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0) < 0) {
|
||||
croak("Type error in argument $argnum of $symname. Expected $1_mangle");
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(varin) SWIGTYPE & {
|
||||
void *temp;
|
||||
if (SWIG_ConvertPtr($input, (void **) &temp, $1_descriptor,0) < 0) {
|
||||
croak("Type error in argument $argnum of $symname. Expected $1_mangle");
|
||||
}
|
||||
$1 = *($1_ltype) temp;
|
||||
}
|
||||
|
||||
%typemap(varin) void * {
|
||||
if (SWIG_ConvertPtr($input, (void **) &$1, 0,0) < 0) {
|
||||
croak("Type error in argument $argnum of $symname. Expected $1_mangle");
|
||||
|
|
@ -357,9 +365,12 @@
|
|||
//%typemap(varout) SWIGTYPE *, SWIGTYPE &, SWIGTYPE []
|
||||
// "SWIG_MakePtr($result, (void *) $1, $1_descriptor);";
|
||||
|
||||
%typemap(varout,type="$1_descriptor") SWIGTYPE *, SWIGTYPE &, SWIGTYPE []
|
||||
%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) SWIGTYPE
|
||||
// "SWIG_MakePtr($result, (void *) &$1, $&1_descriptor);";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue