aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
Diffstat (limited to 'test/data')
-rw-r--r--test/data/emacs-module/mod-test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c
index fc29a0d6b9a..f378db00cd4 100644
--- a/test/data/emacs-module/mod-test.c
+++ b/test/data/emacs-module/mod-test.c
@@ -264,8 +264,14 @@ bind_function (emacs_env *env, const char *name, emacs_value Sfun)
264int 264int
265emacs_module_init (struct emacs_runtime *ert) 265emacs_module_init (struct emacs_runtime *ert)
266{ 266{
267 if (ert->size < sizeof *ert)
268 return 1;
269
267 emacs_env *env = ert->get_environment (ert); 270 emacs_env *env = ert->get_environment (ert);
268 271
272 if (env->size <= sizeof *env)
273 return 2;
274
269#define DEFUN(lsym, csym, amin, amax, doc, data) \ 275#define DEFUN(lsym, csym, amin, amax, doc, data) \
270 bind_function (env, lsym, \ 276 bind_function (env, lsym, \
271 env->make_function (env, amin, amax, csym, doc, data)) 277 env->make_function (env, amin, amax, csym, doc, data))