Remove easserts etc. from emacs-module.c
commit6e4abc9d100732b0825f72b402dda8912d3d1755
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Jun 2017 06:52:10 +0000 (4 23:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Jun 2017 06:53:47 +0000 (4 23:53 -0700)
treed1c607279eda83b30b7ed72df9b119d6c7a3f54b
parent620d65370afd319b706cea0eccffd0ee0ffd2e26
Remove easserts etc. from emacs-module.c

Most of these seem to run afoul of the comment "Do NOT use
'eassert' for checking validity of user code in the module."
* src/emacs-module.c (MODULE_FUNCTION_BEGIN_NO_CATCH)
(module_non_local_exit_check, module_non_local_exit_clear)
(module_non_local_exit_get, module_non_local_exit_signal)
(module_non_local_exit_throw, module_make_string):
Remove unnecessary easserts that pointers are nonnull.
Hardware checks this for us nowadays, and the checks
just clutter up the code.
(module_extract_integer): Remove unnecessary verify that
a C signed integer is in the range INTMAX_MIN..INTMAX_MAX.
The C standard guarantees this.
(module_copy_string_contents): Remove unnecessary eassert
that Lisp strings are null-terminated.
(module_function_arity): Remove unnecessary easserts that
function arities are in range.
src/emacs-module.c