1Compress::Raw::Bzip2 T_PTROBJ 2Compress::Raw::Bunzip2 T_PTROBJ 3 4const char * T_PV 5char * T_PV 6uLong T_UV 7z_off_t T_UV 8DualType T_DUAL 9int_undef T_IV_undef 10 11 12############################################################################# 13INPUT 14T_UV 15 $var = (unsigned long)SvUV($arg) 16T_IV_undef 17 if (SvOK($arg)) 18 $var = SvIV($arg); 19 else 20 $var = 0 ; 21T_PV 22 if (SvOK($arg)) 23 $var = ($type)SvPVbyte_nolen($arg); 24 else 25 $var = NULL ; 26 27T_PTROBJ_AV 28 if ($arg == &PL_sv_undef || $arg == NULL) 29 $var = NULL ; 30 else if (sv_derived_from($arg, \"${ntype}\")) { 31 IV tmp = SvIV(getInnerObject($arg)) ; 32 $var = INT2PTR($type, tmp); 33 } 34 else 35 croak(\"$var is not of type ${ntype}\") 36 37 38 39############################################################################# 40OUTPUT 41T_UV 42 sv_setuv($arg, (IV)$var); 43 44 45T_DUAL 46 setDUALstatus($arg, $var) ; 47 48 49T_PV 50 sv_setpv((SV*)$arg, $var); 51