blob: b18d5e40e589171abe4fe95f6ce7f1984704c62f [file] [log] [blame]
################################################################################
#
# typemap -- XS type mappings not present in early perls
#
################################################################################
#
# $Revision: 10 $
# $Author: mhx $
# $Date: 2010/03/07 13:15:40 +0100 $
#
################################################################################
#
# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz.
# Version 2.x, Copyright (C) 2001, Paul Marquess.
# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
#
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
################################################################################
UV T_UV
NV T_NV
HV * T_HVREF
INPUT
T_UV
$var = ($type)SvUV($arg)
T_NV
$var = ($type)SvNV($arg)
T_HVREF
if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV)
$var = (HV*)SvRV($arg);
else
Perl_croak(aTHX_ \"$var is not a hash reference\")
OUTPUT
T_UV
sv_setuv($arg, (UV)$var);
T_NV
sv_setnv($arg, (NV)$var);