diff options
| author | Philipp Stephani | 2025-03-25 02:56:01 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2025-03-25 02:56:01 +0100 |
| commit | 8efcdcab8658ff9537fe483e0a12875cca90a527 (patch) | |
| tree | b4d6de5910dbbe1e66984508ca0079d84d7fcb65 /src | |
| parent | 96a1a07fb1f9d8f3f41f3893ed1b624246a76c43 (diff) | |
| download | emacs-8efcdcab8658ff9537fe483e0a12875cca90a527.tar.gz emacs-8efcdcab8658ff9537fe483e0a12875cca90a527.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 3 |
1 files changed, 1 insertions, 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) | |||
| 925 | { | 925 | { |
| 926 | CHECK_VECTOR (lvec); | 926 | CHECK_VECTOR (lvec); |
| 927 | if (! (0 <= i && i < ASIZE (lvec))) | 927 | if (! (0 <= i && i < ASIZE (lvec))) |
| 928 | args_out_of_range_3 (INT_TO_INTEGER (i), | 928 | args_out_of_range (lvec, INT_TO_INTEGER (i)); |
| 929 | make_fixnum (0), make_fixnum (ASIZE (lvec) - 1)); | ||
| 930 | } | 929 | } |
| 931 | 930 | ||
| 932 | static void | 931 | static void |