1. 06 Jun, 2017 6 commits
  2. 05 Jun, 2017 19 commits
  3. 04 Jun, 2017 15 commits
    • Philipp Stephani's avatar
      Remove an unused error symbol · 2aa8b156
      Philipp Stephani authored
      * src/emacs-module.c (syms_of_module): Remove unused error symbol
      'invalid-module-call'.
      2aa8b156
    • Philipp Stephani's avatar
      Support quitting in modules · 66da3f4a
      Philipp Stephani authored
      The idea is that modules should call env->should_quit from time to
      time and return as quickly as possible if it returns true.
      
      * src/emacs-module.c (module_should_quit): New module function.
      (initialize_environment): Use it.
      (funcall_module): Process potential pending quit.
      
      * src/eval.c (maybe_quit): Add reference to module_should_quit.
      66da3f4a
    • Philipp Stephani's avatar
      Use more specific errors for module load failure · d3720172
      Philipp Stephani authored
      * src/emacs-module.c (syms_of_module): Add more specific error
      symbols.
      (Fmodule_load): Use them.
      d3720172
    • Philipp Stephani's avatar
      Remove an unneeded assertion · 27445a82
      Philipp Stephani authored
      * src/emacs-module.c (module_copy_string_contents): Remove unneeded
      assertion.  If this assertion triggers, we raise an error anyway.
      27445a82
    • Philipp Stephani's avatar
      Guard against signed integer overflows · a8a93b11
      Philipp Stephani authored
      * src/emacs-module.c (module_extract_integer)
      (module_copy_string_contents, module_make_string): Guard against
      signed integer overflows.
      a8a93b11
    • Philipp Stephani's avatar
      Add a couple more assertions to the module code · 54970624
      Philipp Stephani authored
      These can help module authors debug crashes.
      
      * emacs-module.c (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_copy_string_contents, module_make_string)
      (funcall_module, initialize_environment): Add assertions
      54970624
    • Philipp Stephani's avatar
      ; Grammar fix · fb3a9fd3
      Philipp Stephani authored
      fb3a9fd3
    • Philipp Stephani's avatar
      ; Small comment fix · 034275eb
      Philipp Stephani authored
      * emacs-module.c (MODULE_FUNCTION_BEGIN): Don't say that the error
      value should be a sentinel value, because in almost all cases it
      isn't.
      034275eb
    • Philipp Stephani's avatar
      Use ATTRIBUTE_MAY_ALIAS where alias violations are likely · 9be8b2bf
      Philipp Stephani authored
      In particular, alias violations are likely for the return values of
      dlsym(3), which get cast around arbitrarily.
      
      * src/emacs-module.c (Fmodule_load): Use ATTRIBUTE_MAY_ALIAS.
      9be8b2bf
    • Philipp Stephani's avatar
      Simplify interface of dynlib_attr. · 366e25a6
      Philipp Stephani authored
      Instead of returning bool, set the argument pointers to NULL if the
      information is not available.
      
      * src/dynlib.c (dynlib_addr): Don't return bool.
      366e25a6
    • Philipp Stephani's avatar
      Rationalize environment lifetime management functions · 045d21c2
      Philipp Stephani authored
      * src/emacs-module.c (Fmodule_load, funcall_module): Adapt callers.
      (finalize_environment): Add parameter for public part of the
      environment, like 'initialize_environment'.  Add assertions.
      045d21c2
    • Philipp Stephani's avatar
      Rework printing of module functions · 3b0080de
      Philipp Stephani authored
      Fix a FIXME in emacs-module.c.  Put the printing into print.c, like
      other types.
      
      * src/print.c (print_vectorlike): Add code to print module functions.
      
      * src/emacs-module.c (funcall_module): Stop calling
      'module_format_fun_env'.  Now that module functions are first-class
      objects, they can be added to signal data directly.
      (module_handle_signal): Remove now-unused function
      'module_format_fun_env'.
      
      * test/src/emacs-module-tests.el (mod-test-sum-test): Adapt unit test.
      
      * src/eval.c (funcall_lambda): Adapt call to changed signature of
      'funcall_module'.
      3b0080de
    • Philipp Stephani's avatar
      Define helper macro to reduce code duplication · 18396997
      Philipp Stephani authored
      * src/emacs-module.c (MODULE_FUNCTION_BEGIN_NO_CATCH): New helper
      macro.
      (MODULE_FUNCTION_BEGIN, module_type_of, module_is_not_nil, module_eq):
      Use it.
      18396997
    • Philipp Stephani's avatar
      Remove two FIXMEs that can't be fixed · db743842
      Philipp Stephani authored
      db743842
    • Eli Zaretskii's avatar
      Avoid slow startup in daemon mode when global-linum-mode is on · bd3c6eec
      Eli Zaretskii authored
      * lisp/linum.el (linum-on): Don't turn on linum-mode in a
      non-client frame of a daemon session.  (Bug#27210)
      bd3c6eec