]> git.eshelyaron.com Git - emacs.git/commit
Change list-length intptr_t to ptrdiff_t
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 20 Jul 2024 16:03:24 +0000 (09:03 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 22 Jul 2024 10:38:19 +0000 (12:38 +0200)
commit2e25f5b062dd6d2657ea8773ff04ad21c10b555a
tree95b057b0e8a395976181e6329bd0594dee338a1a
parent86489f933632be9cac7115c9b516eca51f573d3a
Change list-length intptr_t to ptrdiff_t

* src/fns.c (list_length, Fsafe_length, Fproper_list_p):
Use ptrdiff_t not intptr_t for accumulator, since result is ptrdiff_t.
This fixes a minor glitch in 2019-01-11T05:35:31!eggert@cs.ucla.edu
where I removed unnecessary overflow checks but forgot to change types.
This change should alter generated code only on oddball platforms where
ptrdiff_t is narrower than intptr_t, e.g., CheriBSD.

(cherry picked from commit 76497a01425e19a6c3a02c1e3031061fa0e7885b)
src/fns.c