From: Nicholas Clark Date: Fri, 16 Oct 2009 10:59:48 +0000 (+0100) Subject: Convert sv_2mortal(newSVpvn()) to newSVpvn_flags(), for 5.11.0 and later. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7cffa0b862541c21ec66e4efd2d80e4f0a2f142;p=p5sagit%2Fp5-mst-13.2.git Convert sv_2mortal(newSVpvn()) to newSVpvn_flags(), for 5.11.0 and later. --- diff --git a/dist/IO/IO.pm b/dist/IO/IO.pm index c63648e..61e957c 100644 --- a/dist/IO/IO.pm +++ b/dist/IO/IO.pm @@ -7,7 +7,7 @@ use Carp; use strict; use warnings; -our $VERSION = "1.25_01"; +our $VERSION = "1.25_02"; XSLoader::load 'IO', $VERSION; sub import { diff --git a/dist/IO/IO.xs b/dist/IO/IO.xs index d3dff55..08fefb0 100644 --- a/dist/IO/IO.xs +++ b/dist/IO/IO.xs @@ -158,7 +158,11 @@ fgetpos(handle) if (fgetpos(handle, &pos)) { ST(0) = &PL_sv_undef; } else { +# if PERL_VERSION >= 11 + ST(0) = newSVpvn_flags((char*)&pos, sizeof(Fpos_t), SVs_TEMP); +# else ST(0) = sv_2mortal(newSVpvn((char*)&pos, sizeof(Fpos_t))); +# endif } #endif }