diff options
| author | Philipp Stephani | 2025-03-25 14:24:04 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2025-03-25 14:24:04 +0100 |
| commit | 0b1102a70413dabba082d822c200b014464de667 (patch) | |
| tree | 037d0c0bec7d44c4969172062f94c98a74719bc6 /src | |
| parent | 2adc912d0ec277d9ffe6485e7d81849fab98a2ea (diff) | |
| download | emacs-0b1102a70413dabba082d822c200b014464de667.tar.gz emacs-0b1102a70413dabba082d822c200b014464de667.zip | |
Rename 'buffer-too-small' to 'memory-buffer-too-small'.
This clarifies that the error isn't talking about an editing buffer.
* src/emacs-module.c (module_memory_buffer_too_small): Rename from
'module_buffer_too_small'.
(module_copy_string_contents, module_extract_big_integer): Adapt
callers.
(syms_of_module): Rename symbol 'buffer-too-small' to
'memory-buffer-too-small'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 32b78b0d978..22590a23cb2 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -224,11 +224,11 @@ module_decode_utf_8 (const char *str, ptrdiff_t len) | |||
| 224 | return s; | 224 | return s; |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | /* Signal an error of type `buffer-too-small'. */ | 227 | /* Signal an error of type `memory-buffer-too-small'. */ |
| 228 | static void | 228 | static void |
| 229 | module_buffer_too_small (ptrdiff_t actual, ptrdiff_t required) | 229 | module_memory_buffer_too_small (ptrdiff_t actual, ptrdiff_t required) |
| 230 | { | 230 | { |
| 231 | xsignal2 (Qbuffer_too_small, INT_TO_INTEGER (actual), | 231 | xsignal2 (Qmemory_buffer_too_small, INT_TO_INTEGER (actual), |
| 232 | INT_TO_INTEGER (required)); | 232 | INT_TO_INTEGER (required)); |
| 233 | } | 233 | } |
| 234 | 234 | ||
| @@ -825,7 +825,7 @@ module_copy_string_contents (emacs_env *env, emacs_value value, char *buf, | |||
| 825 | { | 825 | { |
| 826 | ptrdiff_t actual = *len; | 826 | ptrdiff_t actual = *len; |
| 827 | *len = required_buf_size; | 827 | *len = required_buf_size; |
| 828 | module_buffer_too_small (actual, required_buf_size); | 828 | module_memory_buffer_too_small (actual, required_buf_size); |
| 829 | } | 829 | } |
| 830 | 830 | ||
| 831 | *len = required_buf_size; | 831 | *len = required_buf_size; |
| @@ -1113,7 +1113,7 @@ module_extract_big_integer (emacs_env *env, emacs_value arg, int *sign, | |||
| 1113 | { | 1113 | { |
| 1114 | ptrdiff_t actual = *count; | 1114 | ptrdiff_t actual = *count; |
| 1115 | *count = required; | 1115 | *count = required; |
| 1116 | module_buffer_too_small (actual, required); | 1116 | module_memory_buffer_too_small (actual, required); |
| 1117 | } | 1117 | } |
| 1118 | /* Set u = abs(x). See https://stackoverflow.com/a/17313717. */ | 1118 | /* Set u = abs(x). See https://stackoverflow.com/a/17313717. */ |
| 1119 | if (0 < x) | 1119 | if (0 < x) |
| @@ -1147,7 +1147,7 @@ module_extract_big_integer (emacs_env *env, emacs_value arg, int *sign, | |||
| 1147 | { | 1147 | { |
| 1148 | ptrdiff_t actual = *count; | 1148 | ptrdiff_t actual = *count; |
| 1149 | *count = required; | 1149 | *count = required; |
| 1150 | module_buffer_too_small (actual, required); | 1150 | module_memory_buffer_too_small (actual, required); |
| 1151 | } | 1151 | } |
| 1152 | size_t written; | 1152 | size_t written; |
| 1153 | mpz_export (magnitude, &written, order, size, endian, nails, *x); | 1153 | mpz_export (magnitude, &written, order, size, endian, nails, *x); |
| @@ -1773,10 +1773,10 @@ syms_of_module (void) | |||
| 1773 | Fput (Qinvalid_arity, Qerror_message, | 1773 | Fput (Qinvalid_arity, Qerror_message, |
| 1774 | build_string ("Invalid function arity")); | 1774 | build_string ("Invalid function arity")); |
| 1775 | 1775 | ||
| 1776 | DEFSYM (Qbuffer_too_small, "buffer-too-small"); | 1776 | DEFSYM (Qmemory_buffer_too_small, "memory-buffer-too-small"); |
| 1777 | Fput (Qbuffer_too_small, Qerror_conditions, | 1777 | Fput (Qmemory_buffer_too_small, Qerror_conditions, |
| 1778 | list2 (Qbuffer_too_small, Qerror)); | 1778 | list2 (Qmemory_buffer_too_small, Qerror)); |
| 1779 | Fput (Qbuffer_too_small, Qerror_message, | 1779 | Fput (Qmemory_buffer_too_small, Qerror_message, |
| 1780 | build_unibyte_string ("Memory buffer too small")); | 1780 | build_unibyte_string ("Memory buffer too small")); |
| 1781 | 1781 | ||
| 1782 | DEFSYM (Qmodule_function_p, "module-function-p"); | 1782 | DEFSYM (Qmodule_function_p, "module-function-p"); |