#
# Map C types to Perl types
#
struct in_addr *		T_PTROBJ
#
# Input conversions
#
INPUT
T_PTROBJ
	if (sv_derived_from($arg, \"${ntype}\")) {
	    IV tmp = SvIV((SV*)SvRV($arg));
	    $var = ($type) tmp;
	}
	else
	    croak(\"$var is not of type ${ntype}\")
#
# Output conversions
#
OUTPUT
T_PTROBJ
	sv_setref_pv($arg, \"${ntype}\", (void*)$var);