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.
This commit is contained in:
Philipp Stephani 2025-03-25 02:56:01 +01:00
parent 96a1a07fb1
commit 8efcdcab86

View file

@ -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