1TYPEMAP 2kqueue_t KQUEUE_OBJECT 3uintptr_t T_U_INT 4u_short T_U_SHORT 5intptr_t T_INT 6 7INPUT 8KQUEUE_OBJECT 9 if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) 10 $var = ($type)SvIV((SV*)SvRV( $arg )); 11 else{ 12 warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" ); 13 XSRETURN_UNDEF; 14 } 15 16OUTPUT 17 18# The Perl object is blessed into 'CLASS', which should be a 19# char* having the name of the package for the blessing. 20KQUEUE_OBJECT 21 sv_setref_iv( $arg, (const char *)CLASS, (IV)$var ); 22