From 7fe0564befaeb45f8f9f2f5753f2b24e1f891d15 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 11 Jul 2024 15:40:47 +0200 Subject: [PATCH 17/17] Rename timefns static function lisp_time_struct * src/timefns.c (lisp_time_cform): Rename from lisp_time_struct, since it no longer returns a struct, and now accepts CFORM. All uses changed. --- src/timefns.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/timefns.c b/src/timefns.c index 8c30016360d..1e551009df8 100644 --- a/src/timefns.c +++ b/src/timefns.c @@ -1125,24 +1125,24 @@ list4_to_timespec (Lisp_Object high, Lisp_Object low, return err_time.err ? invalid_timespec () : err_time.time.ts; } -/* Decode a Lisp list SPECIFIED_TIME that represents a time. +/* Decode a Lisp time value SPECIFIED_TIME that represents a time. If SPECIFIED_TIME is nil, use the current time. Decode to CFORM form. Signal an error if SPECIFIED_TIME does not represent a time. */ static union c_time -lisp_time_struct (Lisp_Object specified_time, enum cform cform) +lisp_time_cform (Lisp_Object specified_time, enum cform cform) { return decode_lisp_time (specified_time, cform).time; } -/* Decode a Lisp list SPECIFIED_TIME that represents a time. +/* Decode a Lisp time value SPECIFIED_TIME that represents a time. Discard any low-order (sub-ns) resolution. If SPECIFIED_TIME is nil, use the current time. Signal an error if SPECIFIED_TIME does not represent a timespec. */ struct timespec lisp_time_argument (Lisp_Object specified_time) { - struct timespec t = lisp_time_struct (specified_time, CFORM_TIMESPEC).ts; + struct timespec t = lisp_time_cform (specified_time, CFORM_TIMESPEC).ts; if (! timespec_valid_p (t)) time_overflow (); return t; @@ -1346,8 +1346,8 @@ time_cmp (Lisp_Object a, Lisp_Object b) /* Compare (ATICKS . AZ) to (BTICKS . BHZ) by comparing ATICKS * BHZ to BTICKS * AHZ. */ - struct ticks_hz ta = lisp_time_struct (a, CFORM_TICKS_HZ).th; - struct ticks_hz tb = lisp_time_struct (b, CFORM_TICKS_HZ).th; + struct ticks_hz ta = lisp_time_cform (a, CFORM_TICKS_HZ).th; + struct ticks_hz tb = lisp_time_cform (b, CFORM_TICKS_HZ).th; mpz_t const *za = bignum_integer (&mpz[0], ta.ticks); mpz_t const *zb = bignum_integer (&mpz[1], tb.ticks); if (! (FASTER_TIMEFNS && BASE_EQ (ta.hz, tb.hz))) @@ -1630,7 +1630,7 @@ DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 3, 0, struct ticks_hz th; if (EQ (form, Qt)) { - th = lisp_time_struct (specified_time, CFORM_TICKS_HZ).th; + th = lisp_time_cform (specified_time, CFORM_TICKS_HZ).th; struct timespec ts = ticks_hz_to_timespec (th.ticks, th.hz); if (! timespec_valid_p (ts)) time_overflow (); -- 2.34.1