From: Robin Barker Date: Wed, 8 Nov 2000 11:11:39 +0000 (+0000) Subject: int/ptr casts in perlio.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e7778b439721b18687ae767a95ed8dea21aaee16;p=p5sagit%2Fp5-mst-13.2.git int/ptr casts in perlio.c Message-Id: <200011081111.LAA07377@tempest.npl.co.uk> p4raw-id: //depot/perl@7603 --- diff --git a/perlio.c b/perlio.c index ee6aa4c..1b5bd76 100644 --- a/perlio.c +++ b/perlio.c @@ -340,7 +340,7 @@ PerlIO_define_layer(PerlIO_funcs *tab) { dTHX; HV *stash = gv_stashpv("perlio::Layer", TRUE); - SV *sv = sv_bless(newRV_noinc(newSViv((IV) tab)),stash); + SV *sv = sv_bless(newRV_noinc(newSViv(PTR2IV(tab))),stash); hv_store(PerlIO_layer_hv,tab->name,strlen(tab->name),sv,0); } @@ -409,7 +409,7 @@ PerlIO_default_layer(I32 n) svp = av_fetch(PerlIO_layer_av,n,0); if (svp && (layer = *svp) && SvROK(layer) && SvIOK((layer = SvRV(layer)))) { - tab = (PerlIO_funcs *) SvIV(layer); + tab = INT2PTR(PerlIO_funcs *, SvIV(layer)); } /* PerlIO_debug("Layer %d is %s\n",n,tab->name); */ return tab;