emacs-module.c simplification and tuneup
commit08e239a21936dcb0a79778ed591dfea50016f6a0
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 2 Mar 2016 18:47:27 +0000 (2 10:47 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 2 Mar 2016 18:48:06 +0000 (2 10:48 -0800)
treee401aad07bed69eb7e62e13452edeb2b14566e81
parentd20d02fef7fd68f03db5abe48548068191dadedf
emacs-module.c simplification and tuneup

* src/emacs-module.c (CHECK_USER_PTR): New function.
(module_get_user_ptr, module_set_user_ptr)
(module_get_user_finalizer, module_set_user_finalizer): Use it.
(module_make_global_ref, module_copy_string_contents)
(module_make_string, module_vec_set, module_vec_get): Omit
unnecessary runtime tests.  For example, vector sizes are always
fixnums, so we don’t need to test that they are in fixnum range.
src/emacs-module.c