From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id F08E51F725 for ; Wed, 13 Dec 2023 00:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1702428622; bh=Brkr27C1WBxmnwa+bKA8YjEP/tbNtI3Xol3Iw45bhT8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ftNzKYzsWU6Xt4Po/eYzdtDMDchY8oP/14pA7/C0Hb6LC9CxgdpblCj1bLFfS09yG segqOuYl/1zh724gg07h7k3/JuRoQYR7o7sNrw9qwbLq05qCdBH4+JugWklDPFncR2 6GTMqFJzzHM1mhDK/UT5SYbWz28JBICU47AuEHAI= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 13/14] gzip_filter: use OO ->zflush dispatch Date: Wed, 13 Dec 2023 00:50:18 +0000 Message-ID: <20231213005019.26912-14-e@80x24.org> In-Reply-To: <20231213005019.26912-1-e@80x24.org> References: <20231213005019.26912-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/GzipFilter.pm b/lib/PublicInbox/GzipFilter.pm index fc471ea2..8b630f25 100644 --- a/lib/PublicInbox/GzipFilter.pm +++ b/lib/PublicInbox/GzipFilter.pm @@ -106,7 +106,7 @@ sub translate { zmore($self, @_); length($self->{zbuf}) >= 8192 ? delete($self->{zbuf}) : ''; } else { # undef == EOF - zflush($self); + $self->zflush; } }