Skip to content

Commit

Permalink
Drop support for Emacs 28 in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
phst committed Feb 23, 2025
1 parent a2bb8d2 commit 839c95f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions elisp/proto/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ enum { kMaxIO = 0x7FFFF000 };

#include "emacs-module.h"

#if !defined EMACS_MAJOR_VERSION || EMACS_MAJOR_VERSION < 28
#if !defined EMACS_MAJOR_VERSION || EMACS_MAJOR_VERSION < 29
# error Emacs module header too old
#endif

Expand Down Expand Up @@ -4281,7 +4281,7 @@ enum InitializationResult {
int VISIBLE emacs_module_init(struct emacs_runtime* rt) {
enum {
kMinimumRuntimeSize = sizeof *rt,
kMinimumEnvironmentSize = sizeof(struct emacs_env_28)
kMinimumEnvironmentSize = sizeof(struct emacs_env_29)
};
if (rt->size < kMinimumRuntimeSize) return kRuntimeTooSmall;
emacs_env* env = rt->get_environment(rt);
Expand Down
4 changes: 2 additions & 2 deletions examples/module.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020, 2022, 2023 Google LLC
// Copyright 2020, 2022, 2023, 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,7 +42,7 @@ static void Provide(emacs_env* env, const char* feature) {
int emacs_module_init(struct emacs_runtime* rt) {
if (rt->size < sizeof *rt) return 1;
emacs_env* env = rt->get_environment(rt);
if (env->size < sizeof(struct emacs_env_28)) return 2;
if (env->size < sizeof(struct emacs_env_29)) return 2;
Defun(env, "module-func", 0, 0, ModuleFunc);
Provide(env, "examples/module");
return 0;
Expand Down

0 comments on commit 839c95f

Please sign in to comment.