summaryrefslogtreecommitdiff
path: root/src/emacs-module.h
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-11-30 14:34:42 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2015-11-30 14:34:42 -0500
commit3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a (patch)
tree3ac52925ea81e1f3119f0582d7aa011310140afe /src/emacs-module.h
parent17fa6ba8245010f2e2eaa7918a1343b9b07f3c56 (diff)
downloademacs-3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a.tar.gz
emacs-3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a.tar.bz2
emacs-3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a.zip
Rely on conservative stack scanning to find "emacs_value"s
* src/emacs-module.c (struct emacs_value_tag) (struct emacs_value_frame, struct emacs_value_storage): Remove. (value_frame_size): Remove constant. (struct emacs_env_private): Use Lisp_Object for non_local_exit info. (lisp_to_value): Remove first arg. (module_nil): New constant. Use it instead of NULL when returning an emacs_value. (module_make_function): Adjust to new calling convention of Qinternal_module_call. (DEFUN): Receive args in an array rather than a list. Use SAFE_ALLOCA rather than xnmalloc. Skip the lisp_to_value loop when we don't have WIDE_EMACS_INT. Adjust to new type of non_local_exit info. (module_non_local_exit_signal_1, module_non_local_exit_throw_1): Adjust to new type of non_local_exit info. (ltv_mark) [WIDE_EMACS_INT]: New constant. (value_to_lisp, lisp_to_value): Rewrite. (initialize_frame, initialize_storage, finalize_storage): Remove functions. (allocate_emacs_value): Remove function. (mark_modules): Gut it. (initialize_environment): Don't initialize storage any more. Keep the actual env object on Vmodule_environments. (finalize_environment): Don't finalize storage any more. (syms_of_module): Initialize ltv_mark and module_nil. * src/emacs-module.h (emacs_value): Make it more clear that this type is really opaque, including the fact that NULL may not be valid. * modules/mod-test/mod-test.c (Fmod_test_signal, Fmod_test_throw): Don't assume that NULL is a valid emacs_value.
Diffstat (limited to 'src/emacs-module.h')
-rw-r--r--src/emacs-module.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emacs-module.h b/src/emacs-module.h
index ea5de76e950..dce5301ab0f 100644
--- a/src/emacs-module.h
+++ b/src/emacs-module.h
@@ -37,7 +37,8 @@ extern "C" {
/* Current environment. */
typedef struct emacs_env_25 emacs_env;
-/* Opaque structure pointer representing an Emacs Lisp value. */
+/* Opaque pointer representing an Emacs Lisp value.
+ BEWARE: Do not assume NULL is a valid value! */
typedef struct emacs_value_tag *emacs_value;
enum emacs_arity { emacs_variadic_function = -2 };