As we're not passing over (or copying in) a NUL, don't need that extra
[p5sagit/p5-mst-13.2.git] / ext / IO / IO.xs
index 4b896a5..eac8a64 100644 (file)
@@ -133,9 +133,9 @@ fgetpos(handle)
     CODE:
        if (handle) {
 #ifdef PerlIO
-           ST(0) = sv_newmortal();
 #if PERL_VERSION < 8
            Fpos_t pos;
+           ST(0) = sv_newmortal();
            if (PerlIO_getpos(handle, &pos) != 0) {
                ST(0) = &PL_sv_undef;
            }
@@ -143,6 +143,7 @@ fgetpos(handle)
                sv_setpvn(ST(0), (char *)&pos, sizeof(Fpos_t));
            }
 #else
+           ST(0) = sv_newmortal();
            if (PerlIO_getpos(handle, ST(0)) != 0) {
                ST(0) = &PL_sv_undef;
            }