]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
gzip_filter: use OO ->zflush dispatch
authorEric Wong <e@80x24.org>
Wed, 13 Dec 2023 00:50:18 +0000 (00:50 +0000)
committerEric Wong <e@80x24.org>
Wed, 13 Dec 2023 09:01:55 +0000 (09:01 +0000)
While it's not in a code path intended WwwCoderepo and RepoAtom,
those classes provide their own ->zflush, this can future-proof
our code against future subclasses at a minor performance cost.

lib/PublicInbox/GzipFilter.pm

index fc471ea2745547ca5d9831d283c9de2c04a0e3dd..8b630f251af5dac0e0b72f4007a1043ef9b6b62a 100644 (file)
@@ -106,7 +106,7 @@ sub translate {
                zmore($self, @_);
                length($self->{zbuf}) >= 8192 ? delete($self->{zbuf}) : '';
        } else { # undef == EOF
-               zflush($self);
+               $self->zflush;
        }
 }