summaryrefslogtreecommitdiff
path: root/Lib/perl5
diff options
context:
space:
mode:
authorRobert Stone <talby@trap.mtview.ca.us>2009-06-02 21:13:03 +0000
committerRobert Stone <talby@trap.mtview.ca.us>2009-06-02 21:13:03 +0000
commit5f1e95ff67573bd3b9855eee4179034067b69e21 (patch)
treefd7b103c4edde9c6980895d3b2b0559d7b162064 /Lib/perl5
parent3e0fc9f7b95f63c51d1f35e0733151a31320623a (diff)
downloadswig-5f1e95ff67573bd3b9855eee4179034067b69e21.tar.gz
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
Diffstat (limited to 'Lib/perl5')
-rw-r--r--Lib/perl5/reference.i25
1 files changed, 25 insertions, 0 deletions
diff --git a/Lib/perl5/reference.i b/Lib/perl5/reference.i
index d3d745cfc..e03d0c303 100644
--- a/Lib/perl5/reference.i
+++ b/Lib/perl5/reference.i
@@ -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
{