From: Jarkko Hietaniemi Date: Fri, 22 Jun 2001 21:17:34 +0000 (+0000) Subject: Casting this way seems to keep both 64-bitint x86 FreeBSD X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=685f876f92b24f3af803e9cf12142657dfafec2f;p=p5sagit%2Fp5-mst-13.2.git Casting this way seems to keep both 64-bitint x86 FreeBSD and Tru64 gcc -Wall happy. p4raw-id: //depot/perl@10840 --- diff --git a/mg.c b/mg.c index 65b2f96..8e0f7cb 100644 --- a/mg.c +++ b/mg.c @@ -45,7 +45,7 @@ S_save_magic(pTHX_ I32 mgs_ix, SV *sv) MGS* mgs; assert(SvMAGICAL(sv)); - SAVEDESTRUCTOR_X(restore_magic, INT2PTR(void*,mgs_ix)); + SAVEDESTRUCTOR_X(restore_magic, INT2PTR(void*, (IV)mgs_ix)); mgs = SSPTR(mgs_ix, MGS*); mgs->mgs_sv = sv; @@ -120,7 +120,7 @@ Perl_mg_get(pTHX_ SV *sv) mgp = &SvMAGIC(sv); /* Re-establish pointer after sv_upgrade */ } - restore_magic(aTHXo_ INT2PTR(void*,mgs_ix)); + restore_magic(aTHXo_ INT2PTR(void*, (IV)mgs_ix)); return 0; } @@ -153,7 +153,7 @@ Perl_mg_set(pTHX_ SV *sv) CALL_FPTR(vtbl->svt_set)(aTHX_ sv, mg); } - restore_magic(aTHXo_ INT2PTR(void*,mgs_ix)); + restore_magic(aTHXo_ INT2PTR(void*, (IV)mgs_ix)); return 0; } @@ -181,7 +181,7 @@ Perl_mg_length(pTHX_ SV *sv) save_magic(mgs_ix, sv); /* omit MGf_GSKIP -- not changed here */ len = CALL_FPTR(vtbl->svt_len)(aTHX_ sv, mg); - restore_magic(aTHXo_ INT2PTR(void*,mgs_ix)); + restore_magic(aTHXo_ INT2PTR(void*, (IV)mgs_ix)); return len; } } @@ -205,7 +205,7 @@ Perl_mg_size(pTHX_ SV *sv) save_magic(mgs_ix, sv); /* omit MGf_GSKIP -- not changed here */ len = CALL_FPTR(vtbl->svt_len)(aTHX_ sv, mg); - restore_magic(aTHXo_ INT2PTR(void*,mgs_ix)); + restore_magic(aTHXo_ INT2PTR(void*, (IV)mgs_ix)); return len; } } @@ -248,7 +248,7 @@ Perl_mg_clear(pTHX_ SV *sv) CALL_FPTR(vtbl->svt_clear)(aTHX_ sv, mg); } - restore_magic(aTHXo_ INT2PTR(void*,mgs_ix)); + restore_magic(aTHXo_ INT2PTR(void*, (IV)mgs_ix)); return 0; }