]> git.eshelyaron.com Git - emacs.git/commit
Simplify time form analysis
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 Jul 2024 00:00:56 +0000 (01:00 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 17 Jul 2024 21:54:05 +0000 (23:54 +0200)
commitb9d87eff6e8cb6c24ea69d65c3380eb8fe8b86b6
tree45d57840cf1e0a1defbbe2dca8064996af9910d1
parent43c2a401091cf80a9a0a9a53a7bb8fc46b01012b
Simplify time form analysis

This does not change behavior; it merely refactors the code
for simplicity.
* src/timefns.c (enum timeform, struct form_time):
Remove.  All uses removed.
(decode_time_components): Accept HZ instead of FORM.
This saves a switch.  All uses changed.
(decode_lisp_time): Return union c_time instead of struct form_time.
All uses changed.
(lisp_time_cform): Remove.  All uses changed to just use
decode_lisp_time.
(time_arith, Ftime_convert): Check (TICKS . HZ) form directly
using CONSP, instead of using the old struct form_time.
That's fast enough here.

(cherry picked from commit e1089cc9b6d7abfe468175eb92b146c884e00374)
src/timefns.c