TYPEMAP
pdl*	T_PDL
pdl *	T_PDL
pdl_trans * T_PDLTRANS
pdl_trans* T_PDLTRANS
Logical	T_IV
PDL_Indx  T_IV
float	T_NV
PDL_Anyval  T_PDL_ANYVAL

INPUT

T_PDL
	$var = PDL->SvPDLV($arg);

T_PDL_ANYVAL
	if (!SvOK($arg)) {
		$var.type = -1;
		$var.value.B = 0;
	} else if (SvIOK($arg)) {
	\#if IVSIZE == 8
		$var.type = PDL_LL;
		$var.value.Q = (PDL_LongLong) SvIV($arg);
	\#else
		$var.type = PDL_L;
		$var.value.L = (PDL_Long) SvIV($arg);
	\#endif
	} else {
		$var.type = PDL_D;
		$var.value.D = (PDL_Double) SvNV($arg);
	}

T_PDLTRANS
	if(sv_isa($arg,\"PDL::Trans\"))
		$var = INT2PTR(pdl_trans *,SvIV(SvRV($arg)));
	else
	        croak(\"$var is not of type PDL::Trans\");

OUTPUT

T_PDL
	PDL->SetSV_PDL($arg,$var);

T_PDL_ANYVAL
	ANYVAL_TO_SV($arg, $var)

T_PDLTRANS
	sv_setref_pv($arg, \"PDL::Trans\", (void*)$var);
