From 75700a8c067d4d910e2017f0aa29cbbca644f9cc Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 11 Aug 2013 08:38:10 +0000 Subject: Post-cvs2svn flatten pass. --- perl_api/typemap | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 perl_api/typemap (limited to 'perl_api/typemap') diff --git a/perl_api/typemap b/perl_api/typemap new file mode 100644 index 0000000..0e38a9c --- /dev/null +++ b/perl_api/typemap @@ -0,0 +1,42 @@ +TYPEMAP +# Grr can't let it end in OBJ 'cause xsubpp would +# s/OBJ$/REF/ that for the DESTROY function +VI T_VIOBJNOMUNGE +VI::OPT T_VIOBJREF +VI::MAP T_VIOBJREF +VI::MARK T_VIOBJREF +AVREF T_AVREFREF + +INPUT +T_AVREFREF + if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_PVAV) + $var = (AV *)SvRV($arg); + else + croak(\"$var is not a reference to an array\") +T_VIOBJNOMUNGE + if (sv_isa($arg, \"VI\")) { + IV tmp = SvIV((SV*)SvRV($arg)); + $var = ($type) tmp; + if (!tmp) + croak(\"screen no longer exists\"); + } + else + croak(\"$var is not of type ${ntype}\") +T_VIOBJREF + if (sv_isa($arg, \"${ntype}\")) { + IV tmp = SvIV((SV*)SvRV($arg)); + if (sv_isa((SV *)tmp, \"VI\")) { + IV tmp2 = SvIV((SV*)SvRV((SV *)tmp)); + $var = ($type) tmp2; + if (!tmp2) + croak(\"screen no longer exists\"); + } + else + croak(\"$var is not of type ${ntype}\"); + } + else + croak(\"$var is not of type ${ntype}\") + +OUTPUT +T_VIOBJNOMUNGE + newVIrv($arg, $var); -- cgit v1.1