From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dancol@dancol.org, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 8e2b2a2: Minor cleanup in pdumper.c
Date: Mon, 21 Jan 2019 12:49:50 -0800 [thread overview]
Message-ID: <90ff5982-f610-e8f1-0f70-3de9dab70e34@cs.ucla.edu> (raw)
In-Reply-To: <838szgat7o.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
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.
[-- Attachment #2: 0001-Simplify-pdumper-load-via-timespectod.patch --]
[-- Type: text/x-patch, Size: 1016 bytes --]
From be73ed4338b37973eb67e8fd91aaa9e1166c665c Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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
next prev parent reply other threads:[~2019-01-21 20:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190119182259.26893.32117@vcs0.savannah.gnu.org>
[not found] ` <20190119182301.0DE562043D@vcs0.savannah.gnu.org>
2019-01-19 21:33 ` [Emacs-diffs] master 8e2b2a2: Minor cleanup in pdumper.c Daniel Colascione
2019-01-19 21:35 ` Daniel Colascione
2019-01-19 21:53 ` Paul Eggert
2019-01-19 21:56 ` Daniel Colascione
2019-01-19 22:41 ` Paul Eggert
2019-01-20 3:44 ` Eli Zaretskii
2019-01-21 20:49 ` Paul Eggert [this message]
2019-01-21 22:46 ` Daniel Colascione
2019-01-22 7:24 ` Paul Eggert
2019-01-22 16:53 ` Eli Zaretskii
2019-01-23 1:29 ` Daniel Colascione
2019-01-23 22:07 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90ff5982-f610-e8f1-0f70-3de9dab70e34@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=dancol@dancol.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.