From 7e782e8ff3ec64500913069a2efb5815fe711a36 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 1 Jun 2020 10:06:52 +0000 Subject: www: remove smsg_mime API and adjust callers To further simplify callers and avoid embarrasing memory explosions[1], we can finally eliminate this method in favor of smsg_eml. [1] commit 7d02b9e64455831d3bda20cd2e64e0c15dc07df5 ("view: stop storing all MIME objects on large threads") fixed a huge memory blowup. --- Documentation/mknews.perl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Documentation/mknews.perl') diff --git a/Documentation/mknews.perl b/Documentation/mknews.perl index 3bdebfce..965c30c1 100755 --- a/Documentation/mknews.perl +++ b/Documentation/mknews.perl @@ -102,9 +102,10 @@ sub mime2txt { } sub mime2html { - my ($out, $mime, $ctx) = @_; - my $smsg = bless { mime => $mime }, 'PublicInbox::Smsg'; - print $out PublicInbox::View::index_entry($smsg, $ctx, 1) or die; + my ($out, $eml, $ctx) = @_; + my $smsg = bless {}, 'PublicInbox::Smsg'; + $smsg->populate($eml); + print $out PublicInbox::View::eml_entry($ctx, $smsg, $eml, 1) or die; } sub html_start { -- cgit v1.2.3-24-ge0c7