typemap cast warning
Robin Barker [Thu, 29 Mar 2001 13:58:47 +0000 (14:58 +0100)]
Message-Id: <200103291258.NAA09360@tempest.npl.co.uk>

p4raw-id: //depot/perl@9437

lib/ExtUtils/typemap

index 3304df5..08ca108 100644 (file)
@@ -122,14 +122,14 @@ T_PTRREF
 T_REF_IV_REF
        if (sv_isa($arg, \"${type}\")) {
            IV tmp = SvIV((SV*)SvRV($arg));
-           $var = *($type *) tmp;
+           $var = *INT2PTR($type *, tmp);
        }
        else
            Perl_croak(aTHX_ \"$var is not of type ${ntype}\")
 T_REF_IV_PTR
        if (sv_isa($arg, \"${ntype}\")) {
            IV tmp = SvIV((SV*)SvRV($arg));
-           $var = ($type) tmp;
+           $var = INT2PTR($type, tmp);
        }
        else
            Perl_croak(aTHX_ \"$var is not of type ${ntype}\")