int
emacs_module_init (struct emacs_runtime *runtime)
@{
- if (ert->size < sizeof (*runtime))
+ if (runtime->size < sizeof (*runtime))
return 1;
@}
@end example
above:
@example
- emacs_env *env = ert->get_environment (runtime);
+ emacs_env *env = runtime->get_environment (runtime);
if (env->size < sizeof (*env))
return 2;
@end example
known sizes, like this:
@example
- emacs_env *env = ert->get_environment (runtime);
+ emacs_env *env = runtime->get_environment (runtime);
if (env->size >= sizeof (struct emacs_env_26))
emacs_version = 26; /* Emacs 26 or later. */
else if (env->size >= sizeof (struct emacs_env_25))
look like this, as part of the module initialization function:
@example
- emacs_env *env = ert->get_environment (runtime);
+ emacs_env *env = runtime->get_environment (runtime);
emacs_value func = env->make_function (env, min_arity, max_arity,
module_func, docstring, data);
emacs_value symbol = env->intern (env, "module-func");
int
emacs_module_init (struct emacs_runtime *runtime)
@{
- emacs_env *env = ert->get_environment (runtime);
+ emacs_env *env = runtime->get_environment (runtime);
emacs_value symbol = env->intern (env, "next-prime");
emacs_value func
= env->make_function (env, 1, 1, next_prime, NULL, NULL);