From 431d18309ef71e167a0ffbe75f9e724220077e69 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Tue, 25 Mar 2025 02:56:01 +0100 Subject: [PATCH] Mimic behavior of 'aref' when signalling out-of-range errors. The convention used by 'aref' and friends is that for 'args-out-of-range', the error data is a list (SEQ INDEX). Use the same convention for the vector-related module functions. * src/emacs-module.c (check_vec_index): Use vector and index as error data. (cherry picked from commit 8efcdcab8658ff9537fe483e0a12875cca90a527) --- src/emacs-module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/emacs-module.c b/src/emacs-module.c index a8386856da7..32b78b0d978 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -925,8 +925,7 @@ check_vec_index (Lisp_Object lvec, ptrdiff_t i) { CHECK_VECTOR (lvec); if (! (0 <= i && i < ASIZE (lvec))) - args_out_of_range_3 (INT_TO_INTEGER (i), - make_fixnum (0), make_fixnum (ASIZE (lvec) - 1)); + args_out_of_range (lvec, INT_TO_INTEGER (i)); } static void -- 2.39.5