about summary refs log tree commit homepage
path: root/lib/PublicInbox/GzipFilter.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-09-10 08:17:24 +0000
committerEric Wong <e@80x24.org>2022-09-10 19:50:53 +0000
commit4dca6dfadbea2c746f20b8c7d7977ef5f96a3106 (patch)
treecc342143987f32cf7c2c132d97902e4a19f705cf /lib/PublicInbox/GzipFilter.pm
parentc48461bffcbac4cf4c400e1edabc6da528cc45d3 (diff)
downloadpublic-inbox-4dca6dfadbea2c746f20b8c7d7977ef5f96a3106.tar.gz
This will let us drop some calls to zmore in subsequent commits.
Diffstat (limited to 'lib/PublicInbox/GzipFilter.pm')
-rw-r--r--lib/PublicInbox/GzipFilter.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/GzipFilter.pm b/lib/PublicInbox/GzipFilter.pm
index 848370ce..72ab5d50 100644
--- a/lib/PublicInbox/GzipFilter.pm
+++ b/lib/PublicInbox/GzipFilter.pm
@@ -94,15 +94,15 @@ sub gone { # what: search/over/mm
 
 # for GetlineBody (via Qspawn) when NOT using $env->{'pi-httpd.async'}
 # Also used for ->getline callbacks
-sub translate ($$) {
-        my $self = $_[0]; # $_[1] => input
+sub translate {
+        my $self = shift; # $_[1] => input
 
         # allocate the zlib context lazily here, instead of in ->new.
         # Deflate contexts are memory-intensive and this object may
         # be sitting in the Qspawn limiter queue for a while.
         $self->{gz} //= gzip_or_die();
-        if (defined $_[1]) { # my $buf = $_[1];
-                zmore($self, $_[1]);
+        if (defined $_[0]) { # my $buf = $_[1];
+                zmore($self, @_);
                 length($self->{zbuf}) >= 8192 ? delete($self->{zbuf}) : '';
         } else { # undef == EOF
                 zflush($self);