projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eaea40b
)
Use three-argument form for out-of-range errors.
author
Philipp Stephani
<phst@google.com>
Tue, 23 Apr 2019 14:59:46 +0000
(16:59 +0200)
committer
Philipp Stephani
<phst@google.com>
Tue, 23 Apr 2019 14:59:46 +0000
(16:59 +0200)
This provides more debugging hints for callers.
* src/emacs-module.c (module_copy_string_contents): Use three-argument
form of args-out-of-range.
src/emacs-module.c
patch
|
blob
|
history
diff --git
a/src/emacs-module.c
b/src/emacs-module.c
index 20dcff2b67adc32ba7eaad2af06723e64359590b..d7704efcf6ead7e95c236b035b4e3dbaa91de013 100644
(file)
--- a/
src/emacs-module.c
+++ b/
src/emacs-module.c
@@
-614,8
+614,11
@@
module_copy_string_contents (emacs_env *env, emacs_value value, char *buffer,
if (*length < required_buf_size)
{
+ ptrdiff_t actual = *length;
*length = required_buf_size;
- xsignal0 (Qargs_out_of_range);
+ args_out_of_range_3 (INT_TO_INTEGER (actual),
+ INT_TO_INTEGER (required_buf_size),
+ INT_TO_INTEGER (PTRDIFF_MAX));
}
*length = required_buf_size;