From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D0B331F5B1 for ; Fri, 17 Jul 2020 06:31:55 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/8] drop binmode usage Date: Fri, 17 Jul 2020 06:31:49 +0000 Message-Id: <20200717063155.3734-3-e@yhbt.net> In-Reply-To: <20200717063155.3734-1-e@yhbt.net> References: <20200717063155.3734-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We only support Unix-like platforms where binmode (":raw") is the default anyways, and v5.10 semantics means it won't do unicode_strings (unlike v5.12). So save some lines of code. --- lib/PublicInbox/Import.pm | 2 -- lib/PublicInbox/SearchIdxShard.pm | 2 -- 2 files changed, 4 deletions(-) diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index fb813159..b61d4b31 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -73,8 +73,6 @@ sub gfi_start { $self->{out} = $out_w; $self->{pid} = $pid; $self->{nchg} = 0; - binmode $out_w, ':raw' or die "binmode :raw failed: $!"; - binmode $in_r, ':raw' or die "binmode :raw failed: $!"; ($in_r, $out_w); } diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm index baf7352a..b51d148b 100644 --- a/lib/PublicInbox/SearchIdxShard.pm +++ b/lib/PublicInbox/SearchIdxShard.pm @@ -26,8 +26,6 @@ sub spawn_worker { my ($self, $v2w, $shard) = @_; my ($r, $w); pipe($r, $w) or die "pipe failed: $!\n"; - binmode $r, ':raw'; - binmode $w, ':raw'; $w->autoflush(1); my $pid = fork; defined $pid or die "fork failed: $!\n";