Commit 272235c1 authored by Philipp Stephani's avatar Philipp Stephani
Browse files

Test module: add necessary version checks

* test/data/emacs-module/mod-test.c (emacs_module_init): Add necessary
version checks.
parent d7f6477c
......@@ -264,8 +264,14 @@ bind_function (emacs_env *env, const char *name, emacs_value Sfun)
emacs_module_init (struct emacs_runtime *ert)
if (ert->size < sizeof *ert)
return 1;
emacs_env *env = ert->get_environment (ert);
if (env->size <= sizeof *env)
return 2;
#define DEFUN(lsym, csym, amin, amax, doc, data) \
bind_function (env, lsym, \
env->make_function (env, amin, amax, csym, doc, data))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment