1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

In timefns, call natnump only for non-fixnums

* src/timefns.c (decode_time_components): Call Fnatnump only
for non-fixnums, as we need to special-case 0 anyway.
This commit is contained in:
Paul Eggert 2024-07-10 11:04:18 +02:00
parent b6cbf0cbb6
commit 2fb7bb41be

View File

@ -895,7 +895,7 @@ decode_time_components (enum timeform form,
case TIMEFORM_TICKS_HZ:
if (! (INTEGERP (high)
&& !NILP (Fnatnump (low)) && !BASE_EQ (low, make_fixnum (0))))
&& (FIXNUMP (low) ? 0 < XFIXNUM (low) : !NILP (Fnatnump (low)))))
return (struct err_time) { .err = EINVAL };
ticks = high;
hz = low;