1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00

Test module: add necessary version checks

* test/data/emacs-module/mod-test.c (emacs_module_init): Add necessary
version checks.
This commit is contained in:
Philipp Stephani 2017-06-12 16:28:16 +02:00
parent d7f6477c01
commit 272235c1d5

View File

@ -264,8 +264,14 @@ bind_function (emacs_env *env, const char *name, emacs_value Sfun)
int
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))