This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate PerlIOMmap_close()
authorDavid Mitchell <davem@iabyn.com>
Mon, 30 Nov 2015 12:02:10 +0000 (12:02 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 30 Nov 2015 12:02:10 +0000 (12:02 +0000)
This static function wasn't being used. For the justification, see

    http://nntp.perl.org/group/perl.perl5.porters/232954

ext/PerlIO-mmap/mmap.pm
ext/PerlIO-mmap/mmap.xs

index 939b94f..0ed59d2 100644 (file)
@@ -1,7 +1,7 @@
 package PerlIO::mmap;
 use strict;
 use warnings;
-our $VERSION = '0.015';
+our $VERSION = '0.016';
 
 use XSLoader;
 XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION);
index ff554e1..b3f1c4f 100644 (file)
@@ -249,22 +249,6 @@ PerlIOMmap_fill(pTHX_ PerlIO *f)
     return code;
 }
 
-static IV
-PerlIOMmap_close(pTHX_ PerlIO *f)
-{
-    PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
-    PerlIOBuf * const b = &m->base;
-    IV code = PerlIO_flush(f);
-    if (m->bbuf) {
-       b->buf = m->bbuf;
-       m->bbuf = NULL;
-       b->ptr = b->end = b->buf;
-    }
-    if (PerlIOBuf_close(aTHX_ f) != 0)
-       code = -1;
-    return code;
-}
-
 static PerlIO *
 PerlIOMmap_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
 {