diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-11-19 14:24:50 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-11-19 14:25:17 -0800 |
commit | d9b300af5c7b07bd870046e73df53e19e860fdb9 (patch) | |
tree | 808f21f765c38490a164d2efe4c8af182299db6c /modules | |
parent | 68d58e69738db41061812b10f2f3f50b6a1b9aa0 (diff) | |
download | emacs-d9b300af5c7b07bd870046e73df53e19e860fdb9.tar.gz |
Omit ‘const’ on locals
Remove ‘const’ qualifier from locals that were newly added.
We don’t normally bother declaring locals with ‘const’ even
though they are not modified, for the same reason we don’t
bother declaring them with ‘register’ even though their
addresses are not taken; the advantage in compile-time
checking isn’t worth the loss of readability.
* modules/mod-test/mod-test.c (Fmod_test_non_local_exit_funcall)
(Fmod_test_vector_fill, Fmod_test_vector_eq):
* src/emacs-module.c (MODULE_SETJMP_1)
(module_make_global_ref, module_free_global_ref)
(module_non_local_exit_get, module_make_function)
(module_extract_integer, module_extract_float)
(module_get_user_ptr, module_set_user_ptr)
(module_get_user_finalizer, module_set_user_finalizer)
(module_vec_get, Fmodule_call)
(module_non_local_exit_signal_1)
(module_non_local_exit_throw_1, lisp_to_value)
(finalize_storage, allocate_emacs_value, mark_modules)
(module_handle_signal, module_handle_throw)
(module_format_fun_env):
* src/eval.c (push_handler, push_handler_nosignal)
(init_handler):
* src/lread.c (suffix_p):
Omit unnecessary ‘const’.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mod-test/mod-test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/mod-test/mod-test.c b/modules/mod-test/mod-test.c index 79f347f04ab..d1a4ce0d6fa 100644 --- a/modules/mod-test/mod-test.c +++ b/modules/mod-test/mod-test.c @@ -78,7 +78,7 @@ Fmod_test_non_local_exit_funcall (emacs_env *env, int nargs, emacs_value args[], void *data) { assert (nargs == 1); - const emacs_value result = env->funcall (env, args[0], 0, NULL); + emacs_value result = env->funcall (env, args[0], 0, NULL); emacs_value non_local_exit_symbol, non_local_exit_data; enum emacs_funcall_exit code = env->non_local_exit_get (env, &non_local_exit_symbol, @@ -90,7 +90,7 @@ Fmod_test_non_local_exit_funcall (emacs_env *env, int nargs, emacs_value args[], case emacs_funcall_exit_signal: { env->non_local_exit_clear (env); - const emacs_value Flist = env->intern (env, "list"); + emacs_value Flist = env->intern (env, "list"); emacs_value list_args[] = {env->intern (env, "signal"), non_local_exit_symbol, non_local_exit_data}; return env->funcall (env, Flist, 3, list_args); @@ -98,7 +98,7 @@ Fmod_test_non_local_exit_funcall (emacs_env *env, int nargs, emacs_value args[], case emacs_funcall_exit_throw: { env->non_local_exit_clear (env); - const emacs_value Flist = env->intern (env, "list"); + emacs_value Flist = env->intern (env, "list"); emacs_value list_args[] = {env->intern (env, "throw"), non_local_exit_symbol, non_local_exit_data}; return env->funcall (env, Flist, 3, list_args); @@ -191,7 +191,7 @@ Fmod_test_vector_fill (emacs_env *env, int nargs, emacs_value args[], void *data { emacs_value vec = args[0]; emacs_value val = args[1]; - const size_t size = env->vec_size (env, vec); + size_t size = env->vec_size (env, vec); for (size_t i = 0; i < size; i++) env->vec_set (env, vec, i, val); return env->intern (env, "t"); @@ -205,7 +205,7 @@ Fmod_test_vector_eq (emacs_env *env, int nargs, emacs_value args[], void *data) { emacs_value vec = args[0]; emacs_value val = args[1]; - const size_t size = env->vec_size (env, vec); + size_t size = env->vec_size (env, vec); for (size_t i = 0; i < size; i++) if (!env->eq (env, env->vec_get (env, vec, i), val)) return env->intern (env, "nil"); |