diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-16 11:59:48 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-16 11:59:48 +0100 |
commit | c7cffa0b862541c21ec66e4efd2d80e4f0a2f142 (patch) | |
tree | 48e98f0ad6526b038062b356ba3e6a13627d0f97 /dist/IO | |
parent | 8a8fad9addd88c65ee8b18b0e45b2ed9a18987f8 (diff) | |
download | perl-c7cffa0b862541c21ec66e4efd2d80e4f0a2f142.tar.gz |
Convert sv_2mortal(newSVpvn()) to newSVpvn_flags(), for 5.11.0 and later.
Diffstat (limited to 'dist/IO')
-rw-r--r-- | dist/IO/IO.pm | 2 | ||||
-rw-r--r-- | dist/IO/IO.xs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/dist/IO/IO.pm b/dist/IO/IO.pm index c63648e974..61e957c2fc 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 d3dff557a2..08fefb0b6b 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 } |