aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorPaul Eggert2015-11-19 14:24:50 -0800
committerPaul Eggert2015-11-19 14:25:17 -0800
commitd9b300af5c7b07bd870046e73df53e19e860fdb9 (patch)
tree808f21f765c38490a164d2efe4c8af182299db6c /src/eval.c
parent68d58e69738db41061812b10f2f3f50b6a1b9aa0 (diff)
downloademacs-d9b300af5c7b07bd870046e73df53e19e860fdb9.tar.gz
emacs-d9b300af5c7b07bd870046e73df53e19e860fdb9.zip
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 'src/eval.c')
-rw-r--r--src/eval.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/eval.c b/src/eval.c
index 9c171473b43..22ee4d1afd1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1399,8 +1399,9 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *),
1399static void init_handler (struct handler *c, Lisp_Object tag_ch_val, 1399static void init_handler (struct handler *c, Lisp_Object tag_ch_val,
1400 enum handlertype handlertype); 1400 enum handlertype handlertype);
1401 1401
1402void push_handler (struct handler **const c, const Lisp_Object tag_ch_val, 1402void
1403 const enum handlertype handlertype) 1403push_handler (struct handler **c, Lisp_Object tag_ch_val,
1404 enum handlertype handlertype)
1404{ 1405{
1405 if (handlerlist->nextfree) 1406 if (handlerlist->nextfree)
1406 *c = handlerlist->nextfree; 1407 *c = handlerlist->nextfree;
@@ -1413,14 +1414,15 @@ void push_handler (struct handler **const c, const Lisp_Object tag_ch_val,
1413 init_handler (*c, tag_ch_val, handlertype); 1414 init_handler (*c, tag_ch_val, handlertype);
1414} 1415}
1415 1416
1416bool push_handler_nosignal (struct handler **const c, const Lisp_Object tag_ch_val, 1417bool
1417 const enum handlertype handlertype) 1418push_handler_nosignal (struct handler **c, Lisp_Object tag_ch_val,
1419 enum handlertype handlertype)
1418{ 1420{
1419 if (handlerlist->nextfree) 1421 if (handlerlist->nextfree)
1420 *c = handlerlist->nextfree; 1422 *c = handlerlist->nextfree;
1421 else 1423 else
1422 { 1424 {
1423 struct handler *const h = malloc (sizeof (struct handler)); 1425 struct handler *h = malloc (sizeof (struct handler));
1424 if (! h) return false; 1426 if (! h) return false;
1425 *c = h; 1427 *c = h;
1426 h->nextfree = NULL; 1428 h->nextfree = NULL;
@@ -1430,8 +1432,9 @@ bool push_handler_nosignal (struct handler **const c, const Lisp_Object tag_ch_v
1430 return true; 1432 return true;
1431} 1433}
1432 1434
1433static void init_handler (struct handler *const c, const Lisp_Object tag_ch_val, 1435static void
1434 const enum handlertype handlertype) 1436init_handler (struct handler *c, Lisp_Object tag_ch_val,
1437 enum handlertype handlertype)
1435{ 1438{
1436 c->type = handlertype; 1439 c->type = handlertype;
1437 c->tag_or_ch = tag_ch_val; 1440 c->tag_or_ch = tag_ch_val;