From e7778b439721b18687ae767a95ed8dea21aaee16 Mon Sep 17 00:00:00 2001 From: Robin Barker Date: Wed, 8 Nov 2000 11:11:39 +0000 Subject: [PATCH] int/ptr casts in perlio.c Message-Id: <200011081111.LAA07377@tempest.npl.co.uk> p4raw-id: //depot/perl@7603 --- perlio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.7.4