From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.ciao.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 8e2b2a2: Minor cleanup in pdumper.c Date: Mon, 21 Jan 2019 12:49:50 -0800 Organization: UCLA Computer Science Department Message-ID: <90ff5982-f610-e8f1-0f70-3de9dab70e34@cs.ucla.edu> References: <20190119182259.26893.32117@vcs0.savannah.gnu.org> <20190119182301.0DE562043D@vcs0.savannah.gnu.org> <034912a4e687ae39bfc17b45ec6a9ef7.squirrel@dancol.org> <4508562eb2e3fe5fedd01263f6c39d5c.squirrel@dancol.org> <176c3ec3-7c6a-8f89-b31c-66c8cd129339@cs.ucla.edu> <65893773f79082a62d6654c818979479.squirrel@dancol.org> <838szgat7o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------103B915DAC86B91B44895001" Injection-Info: ciao.gmane.org; posting-host="ciao.gmane.org:195.159.176.228"; logging-data="46078"; mail-complaints-to="usenet@ciao.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: dancol@dancol.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 21 21:50:05 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1glgWB-000BsV-Sv for ged-emacs-devel@m.gmane.org; Mon, 21 Jan 2019 21:50:04 +0100 Original-Received: from localhost ([127.0.0.1]:59840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glgWA-0006Ol-U8 for ged-emacs-devel@m.gmane.org; Mon, 21 Jan 2019 15:50:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glgW5-0006Oc-E3 for emacs-devel@gnu.org; Mon, 21 Jan 2019 15:49:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glgW3-0000ei-Vb for emacs-devel@gnu.org; Mon, 21 Jan 2019 15:49:57 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40380) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1glgW2-0000dA-A4; Mon, 21 Jan 2019 15:49:54 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 142261610D6; Mon, 21 Jan 2019 12:49:52 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zUVqL-Cv0_a5; Mon, 21 Jan 2019 12:49:50 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E0CC31610D8; Mon, 21 Jan 2019 12:49:50 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3jULF9A7geDL; Mon, 21 Jan 2019 12:49:50 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B37BC160FF9; Mon, 21 Jan 2019 12:49:50 -0800 (PST) In-Reply-To: <838szgat7o.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232578 Archived-At: This is a multi-part message in MIME format. --------------103B915DAC86B91B44895001 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Eli Zaretskii wrote: > Any reason not to use timespectod? Thanks, I had forgotten about timespectod. I installed the attached. Yay, one less use of ALLOW_IMPLICIT_CONVERSION, a macro I'm not a fan of. --------------103B915DAC86B91B44895001 Content-Type: text/x-patch; name="0001-Simplify-pdumper-load-via-timespectod.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Simplify-pdumper-load-via-timespectod.patch" >From be73ed4338b37973eb67e8fd91aaa9e1166c665c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Jan 2019 12:48:42 -0800 Subject: [PATCH] Simplify pdumper-load via timespectod Suggested by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2019-01/msg00458.html * src/pdumper.c (pdumper_load): Simplify. --- src/pdumper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pdumper.c b/src/pdumper.c index e57aa8f2a0..6be26dc816 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -5545,10 +5545,7 @@ pdumper_load (const char *dump_filename) struct timespec load_timespec = timespec_sub (current_timespec (), start_time); - ALLOW_IMPLICIT_CONVERSION; - double s = load_timespec.tv_sec, ns = load_timespec.tv_nsec; - DISALLOW_IMPLICIT_CONVERSION; - dump_private.load_time = (s * 1e9 + ns) / 1e9; + dump_private.load_time = timespectod (load_timespec); dump_private.dump_filename = dump_filename_copy; dump_filename_copy = NULL; -- 2.17.1 --------------103B915DAC86B91B44895001--