diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.h.in | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/emacs-module.h.in b/src/emacs-module.h.in index e1bb00a3df6..cd75c0907e4 100644 --- a/src/emacs-module.h.in +++ b/src/emacs-module.h.in | |||
| @@ -42,6 +42,12 @@ information how to write modules and use this header file. | |||
| 42 | # define EMACS_NOEXCEPT | 42 | # define EMACS_NOEXCEPT |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | #if defined __cplusplus && __cplusplus >= 201703L | ||
| 46 | # define EMACS_NOEXCEPT_TYPEDEF noexcept | ||
| 47 | #else | ||
| 48 | # define EMACS_NOEXCEPT_TYPEDEF | ||
| 49 | #endif | ||
| 50 | |||
| 45 | #ifdef __has_attribute | 51 | #ifdef __has_attribute |
| 46 | #if __has_attribute(__nonnull__) | 52 | #if __has_attribute(__nonnull__) |
| 47 | # define EMACS_ATTRIBUTE_NONNULL(...) __attribute__((__nonnull__(__VA_ARGS__))) | 53 | # define EMACS_ATTRIBUTE_NONNULL(...) __attribute__((__nonnull__(__VA_ARGS__))) |
| @@ -88,11 +94,11 @@ struct emacs_runtime | |||
| 88 | typedef emacs_value (*emacs_function) (emacs_env *env, ptrdiff_t nargs, | 94 | typedef emacs_value (*emacs_function) (emacs_env *env, ptrdiff_t nargs, |
| 89 | emacs_value *args, | 95 | emacs_value *args, |
| 90 | void *data) | 96 | void *data) |
| 91 | EMACS_ATTRIBUTE_NONNULL (1); | 97 | EMACS_NOEXCEPT_TYPEDEF EMACS_ATTRIBUTE_NONNULL (1); |
| 92 | 98 | ||
| 93 | /* Function prototype for module user-pointer and function finalizers. | 99 | /* Function prototype for module user-pointer and function finalizers. |
| 94 | These must not throw C++ exceptions. */ | 100 | These must not throw C++ exceptions. */ |
| 95 | typedef void (*emacs_finalizer) (void *data); | 101 | typedef void (*emacs_finalizer) (void *data) EMACS_NOEXCEPT_TYPEDEF; |
| 96 | 102 | ||
| 97 | /* Possible Emacs function call outcomes. */ | 103 | /* Possible Emacs function call outcomes. */ |
| 98 | enum emacs_funcall_exit | 104 | enum emacs_funcall_exit |