diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-08-20 12:36:39 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-08-20 12:46:52 +0200 |
commit | c818c29771d3cb51875643b2f6c894073e429dd2 (patch) | |
tree | 03111a6e9c917daefd63daa7efa3f029ae6485af /src/lread.c | |
parent | 8a931a97b8dd19a38d6f719f810280a07ba76438 (diff) | |
download | emacs-c818c29771d3cb51875643b2f6c894073e429dd2.tar.gz emacs-c818c29771d3cb51875643b2f6c894073e429dd2.tar.bz2 emacs-c818c29771d3cb51875643b2f6c894073e429dd2.zip |
Revert "Fix native code uneffective loads after recompilation" (bug#42944)
This reverts commit 8a931a97b8dd19a38d6f719f810280a07ba76438.
This introduced bug#42944.
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/lread.c b/src/lread.c index 6b585fcaccc..521da4e1d81 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1635,13 +1635,19 @@ maybe_swap_for_eln (Lisp_Object *filename, int *fd, struct timespec mtime) emacs_close (eln_fd); else { - *filename = eln_name; - emacs_close (*fd); - *fd = eln_fd; - /* Store the eln -> el relation. */ - Fputhash (Ffile_name_nondirectory (eln_name), - el_name, Vcomp_eln_to_el_h); - return; + struct timespec eln_mtime = get_stat_mtime (&eln_st); + if (timespec_cmp (eln_mtime, mtime) > 0) + { + *filename = eln_name; + emacs_close (*fd); + *fd = eln_fd; + /* Store the eln -> el relation. */ + Fputhash (Ffile_name_nondirectory (eln_name), + el_name, Vcomp_eln_to_el_h); + return; + } + else + emacs_close (eln_fd); } } } |