bugfix for Lib/perl5/reference.i (test-suite enhancements coming soon).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11244 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3e0fc9f7b9
commit
5f1e95ff67
2 changed files with 29 additions and 0 deletions
|
|
@ -202,6 +202,31 @@ as follows :
|
|||
$1 = &dvalue;
|
||||
}
|
||||
|
||||
%typemap(typecheck) int *REFERENCE, int &REFERENCE,
|
||||
short *REFERENCE, short &REFERENCE,
|
||||
long *REFERENCE, long &REFERENCE,
|
||||
signed char *REFERENCE, unsigned char &REFERENCE,
|
||||
bool *REFERENCE, bool &REFERENCE
|
||||
{
|
||||
$1 = SvROK($input) && SvIOK(SvRV($input));
|
||||
}
|
||||
%typemap(typecheck) double *REFERENCE, double &REFERENCE,
|
||||
float *REFERENCE, float &REFERENCE
|
||||
{
|
||||
$1 = SvROK($input);
|
||||
if($1) {
|
||||
SV *tmpsv = SvRV($input);
|
||||
$1 = SvNOK(tmpsv) || SvIOK(tmpsv);
|
||||
}
|
||||
}
|
||||
%typemap(typecheck) unsigned int *REFERENCE, unsigned int &REFERENCE,
|
||||
unsigned short *REFERENCE, unsigned short &REFERENCE,
|
||||
unsigned long *REFERENCE, unsigned long &REFERENCE,
|
||||
unsigned char *REFERENCE, unsigned char &REFERENCE
|
||||
{
|
||||
$1 = SvROK($input) && SvUOK(SvRV($input));
|
||||
}
|
||||
|
||||
%typemap(argout) double *REFERENCE, double &REFERENCE,
|
||||
float *REFERENCE, float &REFERENCE
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue