Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 09:13:21

0001 /* emacs-module.h - GNU Emacs module API.
0002 
0003 Copyright (C) 2015-2025 Free Software Foundation, Inc.
0004 
0005 This file is part of GNU Emacs.
0006 
0007 GNU Emacs is free software: you can redistribute it and/or modify
0008 it under the terms of the GNU General Public License as published by
0009 the Free Software Foundation, either version 3 of the License, or (at
0010 your option) any later version.
0011 
0012 GNU Emacs is distributed in the hope that it will be useful,
0013 but WITHOUT ANY WARRANTY; without even the implied warranty of
0014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0015 GNU General Public License for more details.
0016 
0017 You should have received a copy of the GNU General Public License
0018 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
0019 
0020 /*
0021 This file defines the Emacs module API.  Please see the chapter
0022 `Dynamic Modules' in the GNU Emacs Lisp Reference Manual for
0023 information how to write modules and use this header file.
0024 */
0025 
0026 #ifndef EMACS_MODULE_H
0027 #define EMACS_MODULE_H
0028 
0029 #include <stddef.h>
0030 #include <stdint.h>
0031 #include <time.h>
0032 
0033 #if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311 \
0034      && !defined __bool_true_false_are_defined && !defined __cplusplus)
0035 #include <stdbool.h>
0036 #endif
0037 
0038 #define EMACS_MAJOR_VERSION 30
0039 
0040 #if defined __cplusplus && __cplusplus >= 201103L
0041 # define EMACS_NOEXCEPT noexcept
0042 #else
0043 # define EMACS_NOEXCEPT
0044 #endif
0045 
0046 #if defined __cplusplus && __cplusplus >= 201703L
0047 # define EMACS_NOEXCEPT_TYPEDEF noexcept
0048 #else
0049 # define EMACS_NOEXCEPT_TYPEDEF
0050 #endif
0051 
0052 #if 3 < __GNUC__ + (3 <= __GNUC_MINOR__)
0053 # define EMACS_ATTRIBUTE_NONNULL(...) \
0054    __attribute__ ((__nonnull__ (__VA_ARGS__)))
0055 #elif (defined __has_attribute \
0056        && (!defined __clang_minor__ \
0057        || 3 < __clang_major__ + (5 <= __clang_minor__)))
0058 # if __has_attribute (__nonnull__)
0059 #  define EMACS_ATTRIBUTE_NONNULL(...) \
0060     __attribute__ ((__nonnull__ (__VA_ARGS__)))
0061 # endif
0062 #endif
0063 #ifndef EMACS_ATTRIBUTE_NONNULL
0064 # define EMACS_ATTRIBUTE_NONNULL(...)
0065 #endif
0066 
0067 #ifdef __cplusplus
0068 extern "C" {
0069 #endif
0070 
0071 /* Current environment.  */
0072 typedef struct emacs_env_30 emacs_env;
0073 
0074 /* Opaque pointer representing an Emacs Lisp value.
0075    BEWARE: Do not assume NULL is a valid value!  */
0076 typedef struct emacs_value_tag *emacs_value;
0077 
0078 enum { emacs_variadic_function = -2 };
0079 
0080 /* Struct passed to a module init function (emacs_module_init).  */
0081 struct emacs_runtime
0082 {
0083   /* Structure size (for version checking).  */
0084   ptrdiff_t size;
0085 
0086   /* Private data; users should not touch this.  */
0087   struct emacs_runtime_private *private_members;
0088 
0089   /* Return an environment pointer.  */
0090   emacs_env *(*get_environment) (struct emacs_runtime *runtime)
0091     EMACS_ATTRIBUTE_NONNULL (1);
0092 };
0093 
0094 /* Type aliases for function pointer types used in the module API.
0095    Note that we don't use these aliases directly in the API to be able
0096    to mark the function arguments as 'noexcept' before C++20.
0097    However, users can use them if they want.  */
0098 
0099 /* Function prototype for the module Lisp functions.  These must not
0100    throw C++ exceptions.  */
0101 typedef emacs_value (*emacs_function) (emacs_env *env, ptrdiff_t nargs,
0102                                        emacs_value *args,
0103                                        void *data)
0104   EMACS_NOEXCEPT_TYPEDEF EMACS_ATTRIBUTE_NONNULL (1);
0105 
0106 /* Function prototype for module user-pointer and function finalizers.
0107    These must not throw C++ exceptions.  */
0108 typedef void (*emacs_finalizer) (void *data) EMACS_NOEXCEPT_TYPEDEF;
0109 
0110 /* Possible Emacs function call outcomes.  */
0111 enum emacs_funcall_exit
0112 {
0113   /* Function has returned normally.  */
0114   emacs_funcall_exit_return = 0,
0115 
0116   /* Function has signaled an error using `signal'.  */
0117   emacs_funcall_exit_signal = 1,
0118 
0119   /* Function has exited using `throw'.  */
0120   emacs_funcall_exit_throw = 2
0121 };
0122 
0123 /* Possible return values for emacs_env.process_input.  */
0124 enum emacs_process_input_result
0125 {
0126   /* Module code may continue  */
0127   emacs_process_input_continue = 0,
0128 
0129   /* Module code should return control to Emacs as soon as possible.  */
0130   emacs_process_input_quit = 1
0131 };
0132 
0133 /* Define emacs_limb_t so that it is likely to match GMP's mp_limb_t.
0134    This micro-optimization can help modules that use mpz_export and
0135    mpz_import, which operate more efficiently on mp_limb_t.  It's OK
0136    (if perhaps a bit slower) if the two types do not match, and
0137    modules shouldn't rely on the two types matching.  */
0138 typedef size_t emacs_limb_t;
0139 #define EMACS_LIMB_MAX SIZE_MAX
0140 
0141 struct emacs_env_25
0142 {
0143   /* Structure size (for version checking).  */
0144   ptrdiff_t size;
0145 
0146   /* Private data; users should not touch this.  */
0147   struct emacs_env_private *private_members;
0148 
0149   /* Memory management.  */
0150 
0151   emacs_value (*make_global_ref) (emacs_env *env, emacs_value value)
0152     EMACS_ATTRIBUTE_NONNULL(1);
0153 
0154   void (*free_global_ref) (emacs_env *env, emacs_value global_value)
0155     EMACS_ATTRIBUTE_NONNULL(1);
0156 
0157   /* Non-local exit handling.  */
0158 
0159   enum emacs_funcall_exit (*non_local_exit_check) (emacs_env *env)
0160     EMACS_ATTRIBUTE_NONNULL(1);
0161 
0162   void (*non_local_exit_clear) (emacs_env *env)
0163     EMACS_ATTRIBUTE_NONNULL(1);
0164 
0165   enum emacs_funcall_exit (*non_local_exit_get)
0166     (emacs_env *env, emacs_value *symbol, emacs_value *data)
0167     EMACS_ATTRIBUTE_NONNULL(1, 2, 3);
0168 
0169   void (*non_local_exit_signal) (emacs_env *env,
0170                  emacs_value symbol, emacs_value data)
0171     EMACS_ATTRIBUTE_NONNULL(1);
0172 
0173   void (*non_local_exit_throw) (emacs_env *env,
0174                 emacs_value tag, emacs_value value)
0175     EMACS_ATTRIBUTE_NONNULL(1);
0176 
0177   /* Function registration.  */
0178 
0179   emacs_value (*make_function) (emacs_env *env,
0180                 ptrdiff_t min_arity,
0181                 ptrdiff_t max_arity,
0182                 emacs_value (*func) (emacs_env *env,
0183                                                      ptrdiff_t nargs,
0184                                                      emacs_value* args,
0185                                                      void *data)
0186                   EMACS_NOEXCEPT
0187                                   EMACS_ATTRIBUTE_NONNULL(1),
0188                 const char *docstring,
0189                 void *data)
0190     EMACS_ATTRIBUTE_NONNULL(1, 4);
0191 
0192   emacs_value (*funcall) (emacs_env *env,
0193                           emacs_value func,
0194                           ptrdiff_t nargs,
0195                           emacs_value* args)
0196     EMACS_ATTRIBUTE_NONNULL(1);
0197 
0198   emacs_value (*intern) (emacs_env *env, const char *name)
0199     EMACS_ATTRIBUTE_NONNULL(1, 2);
0200 
0201   /* Type conversion.  */
0202 
0203   emacs_value (*type_of) (emacs_env *env, emacs_value arg)
0204     EMACS_ATTRIBUTE_NONNULL(1);
0205 
0206   bool (*is_not_nil) (emacs_env *env, emacs_value arg)
0207     EMACS_ATTRIBUTE_NONNULL(1);
0208 
0209   bool (*eq) (emacs_env *env, emacs_value a, emacs_value b)
0210     EMACS_ATTRIBUTE_NONNULL(1);
0211 
0212   intmax_t (*extract_integer) (emacs_env *env, emacs_value arg)
0213     EMACS_ATTRIBUTE_NONNULL(1);
0214 
0215   emacs_value (*make_integer) (emacs_env *env, intmax_t n)
0216     EMACS_ATTRIBUTE_NONNULL(1);
0217 
0218   double (*extract_float) (emacs_env *env, emacs_value arg)
0219     EMACS_ATTRIBUTE_NONNULL(1);
0220 
0221   emacs_value (*make_float) (emacs_env *env, double d)
0222     EMACS_ATTRIBUTE_NONNULL(1);
0223 
0224   /* Copy the content of the Lisp string VALUE to BUFFER as an utf8
0225      null-terminated string.
0226 
0227      SIZE must point to the total size of the buffer.  If BUFFER is
0228      NULL or if SIZE is not big enough, write the required buffer size
0229      to SIZE and return true.
0230 
0231      Note that SIZE must include the last null byte (e.g. "abc" needs
0232      a buffer of size 4).
0233 
0234      Return true if the string was successfully copied.  */
0235 
0236   bool (*copy_string_contents) (emacs_env *env,
0237                                 emacs_value value,
0238                                 char *buf,
0239                                 ptrdiff_t *len)
0240     EMACS_ATTRIBUTE_NONNULL(1, 4);
0241 
0242   /* Create a Lisp string from a utf8 encoded string.  */
0243   emacs_value (*make_string) (emacs_env *env,
0244                   const char *str, ptrdiff_t len)
0245     EMACS_ATTRIBUTE_NONNULL(1, 2);
0246 
0247   /* Embedded pointer type.  */
0248   emacs_value (*make_user_ptr) (emacs_env *env,
0249                 void (*fin) (void *) EMACS_NOEXCEPT,
0250                 void *ptr)
0251     EMACS_ATTRIBUTE_NONNULL(1);
0252 
0253   void *(*get_user_ptr) (emacs_env *env, emacs_value arg)
0254     EMACS_ATTRIBUTE_NONNULL(1);
0255   void (*set_user_ptr) (emacs_env *env, emacs_value arg, void *ptr)
0256     EMACS_ATTRIBUTE_NONNULL(1);
0257 
0258   void (*(*get_user_finalizer) (emacs_env *env, emacs_value uptr))
0259     (void *) EMACS_NOEXCEPT EMACS_ATTRIBUTE_NONNULL(1);
0260   void (*set_user_finalizer) (emacs_env *env, emacs_value arg,
0261                   void (*fin) (void *) EMACS_NOEXCEPT)
0262     EMACS_ATTRIBUTE_NONNULL(1);
0263 
0264   /* Vector functions.  */
0265   emacs_value (*vec_get) (emacs_env *env, emacs_value vector, ptrdiff_t index)
0266     EMACS_ATTRIBUTE_NONNULL(1);
0267 
0268   void (*vec_set) (emacs_env *env, emacs_value vector, ptrdiff_t index,
0269            emacs_value value)
0270     EMACS_ATTRIBUTE_NONNULL(1);
0271 
0272   ptrdiff_t (*vec_size) (emacs_env *env, emacs_value vector)
0273     EMACS_ATTRIBUTE_NONNULL(1);
0274 };
0275 
0276 struct emacs_env_26
0277 {
0278   /* Structure size (for version checking).  */
0279   ptrdiff_t size;
0280 
0281   /* Private data; users should not touch this.  */
0282   struct emacs_env_private *private_members;
0283 
0284   /* Memory management.  */
0285 
0286   emacs_value (*make_global_ref) (emacs_env *env, emacs_value value)
0287     EMACS_ATTRIBUTE_NONNULL(1);
0288 
0289   void (*free_global_ref) (emacs_env *env, emacs_value global_value)
0290     EMACS_ATTRIBUTE_NONNULL(1);
0291 
0292   /* Non-local exit handling.  */
0293 
0294   enum emacs_funcall_exit (*non_local_exit_check) (emacs_env *env)
0295     EMACS_ATTRIBUTE_NONNULL(1);
0296 
0297   void (*non_local_exit_clear) (emacs_env *env)
0298     EMACS_ATTRIBUTE_NONNULL(1);
0299 
0300   enum emacs_funcall_exit (*non_local_exit_get)
0301     (emacs_env *env, emacs_value *symbol, emacs_value *data)
0302     EMACS_ATTRIBUTE_NONNULL(1, 2, 3);
0303 
0304   void (*non_local_exit_signal) (emacs_env *env,
0305                  emacs_value symbol, emacs_value data)
0306     EMACS_ATTRIBUTE_NONNULL(1);
0307 
0308   void (*non_local_exit_throw) (emacs_env *env,
0309                 emacs_value tag, emacs_value value)
0310     EMACS_ATTRIBUTE_NONNULL(1);
0311 
0312   /* Function registration.  */
0313 
0314   emacs_value (*make_function) (emacs_env *env,
0315                 ptrdiff_t min_arity,
0316                 ptrdiff_t max_arity,
0317                 emacs_value (*func) (emacs_env *env,
0318                                                      ptrdiff_t nargs,
0319                                                      emacs_value* args,
0320                                                      void *data)
0321                   EMACS_NOEXCEPT
0322                                   EMACS_ATTRIBUTE_NONNULL(1),
0323                 const char *docstring,
0324                 void *data)
0325     EMACS_ATTRIBUTE_NONNULL(1, 4);
0326 
0327   emacs_value (*funcall) (emacs_env *env,
0328                           emacs_value func,
0329                           ptrdiff_t nargs,
0330                           emacs_value* args)
0331     EMACS_ATTRIBUTE_NONNULL(1);
0332 
0333   emacs_value (*intern) (emacs_env *env, const char *name)
0334     EMACS_ATTRIBUTE_NONNULL(1, 2);
0335 
0336   /* Type conversion.  */
0337 
0338   emacs_value (*type_of) (emacs_env *env, emacs_value arg)
0339     EMACS_ATTRIBUTE_NONNULL(1);
0340 
0341   bool (*is_not_nil) (emacs_env *env, emacs_value arg)
0342     EMACS_ATTRIBUTE_NONNULL(1);
0343 
0344   bool (*eq) (emacs_env *env, emacs_value a, emacs_value b)
0345     EMACS_ATTRIBUTE_NONNULL(1);
0346 
0347   intmax_t (*extract_integer) (emacs_env *env, emacs_value arg)
0348     EMACS_ATTRIBUTE_NONNULL(1);
0349 
0350   emacs_value (*make_integer) (emacs_env *env, intmax_t n)
0351     EMACS_ATTRIBUTE_NONNULL(1);
0352 
0353   double (*extract_float) (emacs_env *env, emacs_value arg)
0354     EMACS_ATTRIBUTE_NONNULL(1);
0355 
0356   emacs_value (*make_float) (emacs_env *env, double d)
0357     EMACS_ATTRIBUTE_NONNULL(1);
0358 
0359   /* Copy the content of the Lisp string VALUE to BUFFER as an utf8
0360      null-terminated string.
0361 
0362      SIZE must point to the total size of the buffer.  If BUFFER is
0363      NULL or if SIZE is not big enough, write the required buffer size
0364      to SIZE and return true.
0365 
0366      Note that SIZE must include the last null byte (e.g. "abc" needs
0367      a buffer of size 4).
0368 
0369      Return true if the string was successfully copied.  */
0370 
0371   bool (*copy_string_contents) (emacs_env *env,
0372                                 emacs_value value,
0373                                 char *buf,
0374                                 ptrdiff_t *len)
0375     EMACS_ATTRIBUTE_NONNULL(1, 4);
0376 
0377   /* Create a Lisp string from a utf8 encoded string.  */
0378   emacs_value (*make_string) (emacs_env *env,
0379                   const char *str, ptrdiff_t len)
0380     EMACS_ATTRIBUTE_NONNULL(1, 2);
0381 
0382   /* Embedded pointer type.  */
0383   emacs_value (*make_user_ptr) (emacs_env *env,
0384                 void (*fin) (void *) EMACS_NOEXCEPT,
0385                 void *ptr)
0386     EMACS_ATTRIBUTE_NONNULL(1);
0387 
0388   void *(*get_user_ptr) (emacs_env *env, emacs_value arg)
0389     EMACS_ATTRIBUTE_NONNULL(1);
0390   void (*set_user_ptr) (emacs_env *env, emacs_value arg, void *ptr)
0391     EMACS_ATTRIBUTE_NONNULL(1);
0392 
0393   void (*(*get_user_finalizer) (emacs_env *env, emacs_value uptr))
0394     (void *) EMACS_NOEXCEPT EMACS_ATTRIBUTE_NONNULL(1);
0395   void (*set_user_finalizer) (emacs_env *env, emacs_value arg,
0396                   void (*fin) (void *) EMACS_NOEXCEPT)
0397     EMACS_ATTRIBUTE_NONNULL(1);
0398 
0399   /* Vector functions.  */
0400   emacs_value (*vec_get) (emacs_env *env, emacs_value vector, ptrdiff_t index)
0401     EMACS_ATTRIBUTE_NONNULL(1);
0402 
0403   void (*vec_set) (emacs_env *env, emacs_value vector, ptrdiff_t index,
0404            emacs_value value)
0405     EMACS_ATTRIBUTE_NONNULL(1);
0406 
0407   ptrdiff_t (*vec_size) (emacs_env *env, emacs_value vector)
0408     EMACS_ATTRIBUTE_NONNULL(1);
0409 
0410   /* Returns whether a quit is pending.  */
0411   bool (*should_quit) (emacs_env *env)
0412     EMACS_ATTRIBUTE_NONNULL(1);
0413 };
0414 
0415 struct emacs_env_27
0416 {
0417   /* Structure size (for version checking).  */
0418   ptrdiff_t size;
0419 
0420   /* Private data; users should not touch this.  */
0421   struct emacs_env_private *private_members;
0422 
0423   /* Memory management.  */
0424 
0425   emacs_value (*make_global_ref) (emacs_env *env, emacs_value value)
0426     EMACS_ATTRIBUTE_NONNULL(1);
0427 
0428   void (*free_global_ref) (emacs_env *env, emacs_value global_value)
0429     EMACS_ATTRIBUTE_NONNULL(1);
0430 
0431   /* Non-local exit handling.  */
0432 
0433   enum emacs_funcall_exit (*non_local_exit_check) (emacs_env *env)
0434     EMACS_ATTRIBUTE_NONNULL(1);
0435 
0436   void (*non_local_exit_clear) (emacs_env *env)
0437     EMACS_ATTRIBUTE_NONNULL(1);
0438 
0439   enum emacs_funcall_exit (*non_local_exit_get)
0440     (emacs_env *env, emacs_value *symbol, emacs_value *data)
0441     EMACS_ATTRIBUTE_NONNULL(1, 2, 3);
0442 
0443   void (*non_local_exit_signal) (emacs_env *env,
0444                  emacs_value symbol, emacs_value data)
0445     EMACS_ATTRIBUTE_NONNULL(1);
0446 
0447   void (*non_local_exit_throw) (emacs_env *env,
0448                 emacs_value tag, emacs_value value)
0449     EMACS_ATTRIBUTE_NONNULL(1);
0450 
0451   /* Function registration.  */
0452 
0453   emacs_value (*make_function) (emacs_env *env,
0454                 ptrdiff_t min_arity,
0455                 ptrdiff_t max_arity,
0456                 emacs_value (*func) (emacs_env *env,
0457                                                      ptrdiff_t nargs,
0458                                                      emacs_value* args,
0459                                                      void *data)
0460                   EMACS_NOEXCEPT
0461                                   EMACS_ATTRIBUTE_NONNULL(1),
0462                 const char *docstring,
0463                 void *data)
0464     EMACS_ATTRIBUTE_NONNULL(1, 4);
0465 
0466   emacs_value (*funcall) (emacs_env *env,
0467                           emacs_value func,
0468                           ptrdiff_t nargs,
0469                           emacs_value* args)
0470     EMACS_ATTRIBUTE_NONNULL(1);
0471 
0472   emacs_value (*intern) (emacs_env *env, const char *name)
0473     EMACS_ATTRIBUTE_NONNULL(1, 2);
0474 
0475   /* Type conversion.  */
0476 
0477   emacs_value (*type_of) (emacs_env *env, emacs_value arg)
0478     EMACS_ATTRIBUTE_NONNULL(1);
0479 
0480   bool (*is_not_nil) (emacs_env *env, emacs_value arg)
0481     EMACS_ATTRIBUTE_NONNULL(1);
0482 
0483   bool (*eq) (emacs_env *env, emacs_value a, emacs_value b)
0484     EMACS_ATTRIBUTE_NONNULL(1);
0485 
0486   intmax_t (*extract_integer) (emacs_env *env, emacs_value arg)
0487     EMACS_ATTRIBUTE_NONNULL(1);
0488 
0489   emacs_value (*make_integer) (emacs_env *env, intmax_t n)
0490     EMACS_ATTRIBUTE_NONNULL(1);
0491 
0492   double (*extract_float) (emacs_env *env, emacs_value arg)
0493     EMACS_ATTRIBUTE_NONNULL(1);
0494 
0495   emacs_value (*make_float) (emacs_env *env, double d)
0496     EMACS_ATTRIBUTE_NONNULL(1);
0497 
0498   /* Copy the content of the Lisp string VALUE to BUFFER as an utf8
0499      null-terminated string.
0500 
0501      SIZE must point to the total size of the buffer.  If BUFFER is
0502      NULL or if SIZE is not big enough, write the required buffer size
0503      to SIZE and return true.
0504 
0505      Note that SIZE must include the last null byte (e.g. "abc" needs
0506      a buffer of size 4).
0507 
0508      Return true if the string was successfully copied.  */
0509 
0510   bool (*copy_string_contents) (emacs_env *env,
0511                                 emacs_value value,
0512                                 char *buf,
0513                                 ptrdiff_t *len)
0514     EMACS_ATTRIBUTE_NONNULL(1, 4);
0515 
0516   /* Create a Lisp string from a utf8 encoded string.  */
0517   emacs_value (*make_string) (emacs_env *env,
0518                   const char *str, ptrdiff_t len)
0519     EMACS_ATTRIBUTE_NONNULL(1, 2);
0520 
0521   /* Embedded pointer type.  */
0522   emacs_value (*make_user_ptr) (emacs_env *env,
0523                 void (*fin) (void *) EMACS_NOEXCEPT,
0524                 void *ptr)
0525     EMACS_ATTRIBUTE_NONNULL(1);
0526 
0527   void *(*get_user_ptr) (emacs_env *env, emacs_value arg)
0528     EMACS_ATTRIBUTE_NONNULL(1);
0529   void (*set_user_ptr) (emacs_env *env, emacs_value arg, void *ptr)
0530     EMACS_ATTRIBUTE_NONNULL(1);
0531 
0532   void (*(*get_user_finalizer) (emacs_env *env, emacs_value uptr))
0533     (void *) EMACS_NOEXCEPT EMACS_ATTRIBUTE_NONNULL(1);
0534   void (*set_user_finalizer) (emacs_env *env, emacs_value arg,
0535                   void (*fin) (void *) EMACS_NOEXCEPT)
0536     EMACS_ATTRIBUTE_NONNULL(1);
0537 
0538   /* Vector functions.  */
0539   emacs_value (*vec_get) (emacs_env *env, emacs_value vector, ptrdiff_t index)
0540     EMACS_ATTRIBUTE_NONNULL(1);
0541 
0542   void (*vec_set) (emacs_env *env, emacs_value vector, ptrdiff_t index,
0543            emacs_value value)
0544     EMACS_ATTRIBUTE_NONNULL(1);
0545 
0546   ptrdiff_t (*vec_size) (emacs_env *env, emacs_value vector)
0547     EMACS_ATTRIBUTE_NONNULL(1);
0548 
0549   /* Returns whether a quit is pending.  */
0550   bool (*should_quit) (emacs_env *env)
0551     EMACS_ATTRIBUTE_NONNULL(1);
0552 
0553   /* Processes pending input events and returns whether the module
0554      function should quit.  */
0555   enum emacs_process_input_result (*process_input) (emacs_env *env)
0556     EMACS_ATTRIBUTE_NONNULL (1);
0557 
0558   struct timespec (*extract_time) (emacs_env *env, emacs_value arg)
0559     EMACS_ATTRIBUTE_NONNULL (1);
0560 
0561   emacs_value (*make_time) (emacs_env *env, struct timespec time)
0562     EMACS_ATTRIBUTE_NONNULL (1);
0563 
0564   bool (*extract_big_integer) (emacs_env *env, emacs_value arg, int *sign,
0565                                ptrdiff_t *count, emacs_limb_t *magnitude)
0566     EMACS_ATTRIBUTE_NONNULL (1);
0567 
0568   emacs_value (*make_big_integer) (emacs_env *env, int sign, ptrdiff_t count,
0569                                    const emacs_limb_t *magnitude)
0570     EMACS_ATTRIBUTE_NONNULL (1);
0571 };
0572 
0573 struct emacs_env_28
0574 {
0575   /* Structure size (for version checking).  */
0576   ptrdiff_t size;
0577 
0578   /* Private data; users should not touch this.  */
0579   struct emacs_env_private *private_members;
0580 
0581   /* Memory management.  */
0582 
0583   emacs_value (*make_global_ref) (emacs_env *env, emacs_value value)
0584     EMACS_ATTRIBUTE_NONNULL(1);
0585 
0586   void (*free_global_ref) (emacs_env *env, emacs_value global_value)
0587     EMACS_ATTRIBUTE_NONNULL(1);
0588 
0589   /* Non-local exit handling.  */
0590 
0591   enum emacs_funcall_exit (*non_local_exit_check) (emacs_env *env)
0592     EMACS_ATTRIBUTE_NONNULL(1);
0593 
0594   void (*non_local_exit_clear) (emacs_env *env)
0595     EMACS_ATTRIBUTE_NONNULL(1);
0596 
0597   enum emacs_funcall_exit (*non_local_exit_get)
0598     (emacs_env *env, emacs_value *symbol, emacs_value *data)
0599     EMACS_ATTRIBUTE_NONNULL(1, 2, 3);
0600 
0601   void (*non_local_exit_signal) (emacs_env *env,
0602                  emacs_value symbol, emacs_value data)
0603     EMACS_ATTRIBUTE_NONNULL(1);
0604 
0605   void (*non_local_exit_throw) (emacs_env *env,
0606                 emacs_value tag, emacs_value value)
0607     EMACS_ATTRIBUTE_NONNULL(1);
0608 
0609   /* Function registration.  */
0610 
0611   emacs_value (*make_function) (emacs_env *env,
0612                 ptrdiff_t min_arity,
0613                 ptrdiff_t max_arity,
0614                 emacs_value (*func) (emacs_env *env,
0615                                                      ptrdiff_t nargs,
0616                                                      emacs_value* args,
0617                                                      void *data)
0618                   EMACS_NOEXCEPT
0619                                   EMACS_ATTRIBUTE_NONNULL(1),
0620                 const char *docstring,
0621                 void *data)
0622     EMACS_ATTRIBUTE_NONNULL(1, 4);
0623 
0624   emacs_value (*funcall) (emacs_env *env,
0625                           emacs_value func,
0626                           ptrdiff_t nargs,
0627                           emacs_value* args)
0628     EMACS_ATTRIBUTE_NONNULL(1);
0629 
0630   emacs_value (*intern) (emacs_env *env, const char *name)
0631     EMACS_ATTRIBUTE_NONNULL(1, 2);
0632 
0633   /* Type conversion.  */
0634 
0635   emacs_value (*type_of) (emacs_env *env, emacs_value arg)
0636     EMACS_ATTRIBUTE_NONNULL(1);
0637 
0638   bool (*is_not_nil) (emacs_env *env, emacs_value arg)
0639     EMACS_ATTRIBUTE_NONNULL(1);
0640 
0641   bool (*eq) (emacs_env *env, emacs_value a, emacs_value b)
0642     EMACS_ATTRIBUTE_NONNULL(1);
0643 
0644   intmax_t (*extract_integer) (emacs_env *env, emacs_value arg)
0645     EMACS_ATTRIBUTE_NONNULL(1);
0646 
0647   emacs_value (*make_integer) (emacs_env *env, intmax_t n)
0648     EMACS_ATTRIBUTE_NONNULL(1);
0649 
0650   double (*extract_float) (emacs_env *env, emacs_value arg)
0651     EMACS_ATTRIBUTE_NONNULL(1);
0652 
0653   emacs_value (*make_float) (emacs_env *env, double d)
0654     EMACS_ATTRIBUTE_NONNULL(1);
0655 
0656   /* Copy the content of the Lisp string VALUE to BUFFER as an utf8
0657      null-terminated string.
0658 
0659      SIZE must point to the total size of the buffer.  If BUFFER is
0660      NULL or if SIZE is not big enough, write the required buffer size
0661      to SIZE and return true.
0662 
0663      Note that SIZE must include the last null byte (e.g. "abc" needs
0664      a buffer of size 4).
0665 
0666      Return true if the string was successfully copied.  */
0667 
0668   bool (*copy_string_contents) (emacs_env *env,
0669                                 emacs_value value,
0670                                 char *buf,
0671                                 ptrdiff_t *len)
0672     EMACS_ATTRIBUTE_NONNULL(1, 4);
0673 
0674   /* Create a Lisp string from a utf8 encoded string.  */
0675   emacs_value (*make_string) (emacs_env *env,
0676                   const char *str, ptrdiff_t len)
0677     EMACS_ATTRIBUTE_NONNULL(1, 2);
0678 
0679   /* Embedded pointer type.  */
0680   emacs_value (*make_user_ptr) (emacs_env *env,
0681                 void (*fin) (void *) EMACS_NOEXCEPT,
0682                 void *ptr)
0683     EMACS_ATTRIBUTE_NONNULL(1);
0684 
0685   void *(*get_user_ptr) (emacs_env *env, emacs_value arg)
0686     EMACS_ATTRIBUTE_NONNULL(1);
0687   void (*set_user_ptr) (emacs_env *env, emacs_value arg, void *ptr)
0688     EMACS_ATTRIBUTE_NONNULL(1);
0689 
0690   void (*(*get_user_finalizer) (emacs_env *env, emacs_value uptr))
0691     (void *) EMACS_NOEXCEPT EMACS_ATTRIBUTE_NONNULL(1);
0692   void (*set_user_finalizer) (emacs_env *env, emacs_value arg,
0693                   void (*fin) (void *) EMACS_NOEXCEPT)
0694     EMACS_ATTRIBUTE_NONNULL(1);
0695 
0696   /* Vector functions.  */
0697   emacs_value (*vec_get) (emacs_env *env, emacs_value vector, ptrdiff_t index)
0698     EMACS_ATTRIBUTE_NONNULL(1);
0699 
0700   void (*vec_set) (emacs_env *env, emacs_value vector, ptrdiff_t index,
0701            emacs_value value)
0702     EMACS_ATTRIBUTE_NONNULL(1);
0703 
0704   ptrdiff_t (*vec_size) (emacs_env *env, emacs_value vector)
0705     EMACS_ATTRIBUTE_NONNULL(1);
0706 
0707   /* Returns whether a quit is pending.  */
0708   bool (*should_quit) (emacs_env *env)
0709     EMACS_ATTRIBUTE_NONNULL(1);
0710 
0711   /* Processes pending input events and returns whether the module
0712      function should quit.  */
0713   enum emacs_process_input_result (*process_input) (emacs_env *env)
0714     EMACS_ATTRIBUTE_NONNULL (1);
0715 
0716   struct timespec (*extract_time) (emacs_env *env, emacs_value arg)
0717     EMACS_ATTRIBUTE_NONNULL (1);
0718 
0719   emacs_value (*make_time) (emacs_env *env, struct timespec time)
0720     EMACS_ATTRIBUTE_NONNULL (1);
0721 
0722   bool (*extract_big_integer) (emacs_env *env, emacs_value arg, int *sign,
0723                                ptrdiff_t *count, emacs_limb_t *magnitude)
0724     EMACS_ATTRIBUTE_NONNULL (1);
0725 
0726   emacs_value (*make_big_integer) (emacs_env *env, int sign, ptrdiff_t count,
0727                                    const emacs_limb_t *magnitude)
0728     EMACS_ATTRIBUTE_NONNULL (1);
0729 
0730   void (*(*EMACS_ATTRIBUTE_NONNULL (1)
0731             get_function_finalizer) (emacs_env *env,
0732                                      emacs_value arg)) (void *) EMACS_NOEXCEPT;
0733 
0734   void (*set_function_finalizer) (emacs_env *env, emacs_value arg,
0735                                   void (*fin) (void *) EMACS_NOEXCEPT)
0736     EMACS_ATTRIBUTE_NONNULL (1);
0737 
0738   int (*open_channel) (emacs_env *env, emacs_value pipe_process)
0739     EMACS_ATTRIBUTE_NONNULL (1);
0740 
0741   void (*make_interactive) (emacs_env *env, emacs_value function,
0742                             emacs_value spec)
0743     EMACS_ATTRIBUTE_NONNULL (1);
0744 
0745   /* Create a unibyte Lisp string from a string.  */
0746   emacs_value (*make_unibyte_string) (emacs_env *env,
0747                       const char *str, ptrdiff_t len)
0748     EMACS_ATTRIBUTE_NONNULL(1, 2);
0749 };
0750 
0751 struct emacs_env_29
0752 {
0753   /* Structure size (for version checking).  */
0754   ptrdiff_t size;
0755 
0756   /* Private data; users should not touch this.  */
0757   struct emacs_env_private *private_members;
0758 
0759   /* Memory management.  */
0760 
0761   emacs_value (*make_global_ref) (emacs_env *env, emacs_value value)
0762     EMACS_ATTRIBUTE_NONNULL(1);
0763 
0764   void (*free_global_ref) (emacs_env *env, emacs_value global_value)
0765     EMACS_ATTRIBUTE_NONNULL(1);
0766 
0767   /* Non-local exit handling.  */
0768 
0769   enum emacs_funcall_exit (*non_local_exit_check) (emacs_env *env)
0770     EMACS_ATTRIBUTE_NONNULL(1);
0771 
0772   void (*non_local_exit_clear) (emacs_env *env)
0773     EMACS_ATTRIBUTE_NONNULL(1);
0774 
0775   enum emacs_funcall_exit (*non_local_exit_get)
0776     (emacs_env *env, emacs_value *symbol, emacs_value *data)
0777     EMACS_ATTRIBUTE_NONNULL(1, 2, 3);
0778 
0779   void (*non_local_exit_signal) (emacs_env *env,
0780                  emacs_value symbol, emacs_value data)
0781     EMACS_ATTRIBUTE_NONNULL(1);
0782 
0783   void (*non_local_exit_throw) (emacs_env *env,
0784                 emacs_value tag, emacs_value value)
0785     EMACS_ATTRIBUTE_NONNULL(1);
0786 
0787   /* Function registration.  */
0788 
0789   emacs_value (*make_function) (emacs_env *env,
0790                 ptrdiff_t min_arity,
0791                 ptrdiff_t max_arity,
0792                 emacs_value (*func) (emacs_env *env,
0793                                                      ptrdiff_t nargs,
0794                                                      emacs_value* args,
0795                                                      void *data)
0796                   EMACS_NOEXCEPT
0797                                   EMACS_ATTRIBUTE_NONNULL(1),
0798                 const char *docstring,
0799                 void *data)
0800     EMACS_ATTRIBUTE_NONNULL(1, 4);
0801 
0802   emacs_value (*funcall) (emacs_env *env,
0803                           emacs_value func,
0804                           ptrdiff_t nargs,
0805                           emacs_value* args)
0806     EMACS_ATTRIBUTE_NONNULL(1);
0807 
0808   emacs_value (*intern) (emacs_env *env, const char *name)
0809     EMACS_ATTRIBUTE_NONNULL(1, 2);
0810 
0811   /* Type conversion.  */
0812 
0813   emacs_value (*type_of) (emacs_env *env, emacs_value arg)
0814     EMACS_ATTRIBUTE_NONNULL(1);
0815 
0816   bool (*is_not_nil) (emacs_env *env, emacs_value arg)
0817     EMACS_ATTRIBUTE_NONNULL(1);
0818 
0819   bool (*eq) (emacs_env *env, emacs_value a, emacs_value b)
0820     EMACS_ATTRIBUTE_NONNULL(1);
0821 
0822   intmax_t (*extract_integer) (emacs_env *env, emacs_value arg)
0823     EMACS_ATTRIBUTE_NONNULL(1);
0824 
0825   emacs_value (*make_integer) (emacs_env *env, intmax_t n)
0826     EMACS_ATTRIBUTE_NONNULL(1);
0827 
0828   double (*extract_float) (emacs_env *env, emacs_value arg)
0829     EMACS_ATTRIBUTE_NONNULL(1);
0830 
0831   emacs_value (*make_float) (emacs_env *env, double d)
0832     EMACS_ATTRIBUTE_NONNULL(1);
0833 
0834   /* Copy the content of the Lisp string VALUE to BUFFER as an utf8
0835      null-terminated string.
0836 
0837      SIZE must point to the total size of the buffer.  If BUFFER is
0838      NULL or if SIZE is not big enough, write the required buffer size
0839      to SIZE and return true.
0840 
0841      Note that SIZE must include the last null byte (e.g. "abc" needs
0842      a buffer of size 4).
0843 
0844      Return true if the string was successfully copied.  */
0845 
0846   bool (*copy_string_contents) (emacs_env *env,
0847                                 emacs_value value,
0848                                 char *buf,
0849                                 ptrdiff_t *len)
0850     EMACS_ATTRIBUTE_NONNULL(1, 4);
0851 
0852   /* Create a Lisp string from a utf8 encoded string.  */
0853   emacs_value (*make_string) (emacs_env *env,
0854                   const char *str, ptrdiff_t len)
0855     EMACS_ATTRIBUTE_NONNULL(1, 2);
0856 
0857   /* Embedded pointer type.  */
0858   emacs_value (*make_user_ptr) (emacs_env *env,
0859                 void (*fin) (void *) EMACS_NOEXCEPT,
0860                 void *ptr)
0861     EMACS_ATTRIBUTE_NONNULL(1);
0862 
0863   void *(*get_user_ptr) (emacs_env *env, emacs_value arg)
0864     EMACS_ATTRIBUTE_NONNULL(1);
0865   void (*set_user_ptr) (emacs_env *env, emacs_value arg, void *ptr)
0866     EMACS_ATTRIBUTE_NONNULL(1);
0867 
0868   void (*(*get_user_finalizer) (emacs_env *env, emacs_value uptr))
0869     (void *) EMACS_NOEXCEPT EMACS_ATTRIBUTE_NONNULL(1);
0870   void (*set_user_finalizer) (emacs_env *env, emacs_value arg,
0871                   void (*fin) (void *) EMACS_NOEXCEPT)
0872     EMACS_ATTRIBUTE_NONNULL(1);
0873 
0874   /* Vector functions.  */
0875   emacs_value (*vec_get) (emacs_env *env, emacs_value vector, ptrdiff_t index)
0876     EMACS_ATTRIBUTE_NONNULL(1);
0877 
0878   void (*vec_set) (emacs_env *env, emacs_value vector, ptrdiff_t index,
0879            emacs_value value)
0880     EMACS_ATTRIBUTE_NONNULL(1);
0881 
0882   ptrdiff_t (*vec_size) (emacs_env *env, emacs_value vector)
0883     EMACS_ATTRIBUTE_NONNULL(1);
0884 
0885   /* Returns whether a quit is pending.  */
0886   bool (*should_quit) (emacs_env *env)
0887     EMACS_ATTRIBUTE_NONNULL(1);
0888 
0889   /* Processes pending input events and returns whether the module
0890      function should quit.  */
0891   enum emacs_process_input_result (*process_input) (emacs_env *env)
0892     EMACS_ATTRIBUTE_NONNULL (1);
0893 
0894   struct timespec (*extract_time) (emacs_env *env, emacs_value arg)
0895     EMACS_ATTRIBUTE_NONNULL (1);
0896 
0897   emacs_value (*make_time) (emacs_env *env, struct timespec time)
0898     EMACS_ATTRIBUTE_NONNULL (1);
0899 
0900   bool (*extract_big_integer) (emacs_env *env, emacs_value arg, int *sign,
0901                                ptrdiff_t *count, emacs_limb_t *magnitude)
0902     EMACS_ATTRIBUTE_NONNULL (1);
0903 
0904   emacs_value (*make_big_integer) (emacs_env *env, int sign, ptrdiff_t count,
0905                                    const emacs_limb_t *magnitude)
0906     EMACS_ATTRIBUTE_NONNULL (1);
0907 
0908   void (*(*EMACS_ATTRIBUTE_NONNULL (1)
0909             get_function_finalizer) (emacs_env *env,
0910                                      emacs_value arg)) (void *) EMACS_NOEXCEPT;
0911 
0912   void (*set_function_finalizer) (emacs_env *env, emacs_value arg,
0913                                   void (*fin) (void *) EMACS_NOEXCEPT)
0914     EMACS_ATTRIBUTE_NONNULL (1);
0915 
0916   int (*open_channel) (emacs_env *env, emacs_value pipe_process)
0917     EMACS_ATTRIBUTE_NONNULL (1);
0918 
0919   void (*make_interactive) (emacs_env *env, emacs_value function,
0920                             emacs_value spec)
0921     EMACS_ATTRIBUTE_NONNULL (1);
0922 
0923   /* Create a unibyte Lisp string from a string.  */
0924   emacs_value (*make_unibyte_string) (emacs_env *env,
0925                       const char *str, ptrdiff_t len)
0926     EMACS_ATTRIBUTE_NONNULL(1, 2);
0927 
0928 };
0929 
0930 struct emacs_env_30
0931 {
0932   /* Structure size (for version checking).  */
0933   ptrdiff_t size;
0934 
0935   /* Private data; users should not touch this.  */
0936   struct emacs_env_private *private_members;
0937 
0938   /* Memory management.  */
0939 
0940   emacs_value (*make_global_ref) (emacs_env *env, emacs_value value)
0941     EMACS_ATTRIBUTE_NONNULL(1);
0942 
0943   void (*free_global_ref) (emacs_env *env, emacs_value global_value)
0944     EMACS_ATTRIBUTE_NONNULL(1);
0945 
0946   /* Non-local exit handling.  */
0947 
0948   enum emacs_funcall_exit (*non_local_exit_check) (emacs_env *env)
0949     EMACS_ATTRIBUTE_NONNULL(1);
0950 
0951   void (*non_local_exit_clear) (emacs_env *env)
0952     EMACS_ATTRIBUTE_NONNULL(1);
0953 
0954   enum emacs_funcall_exit (*non_local_exit_get)
0955     (emacs_env *env, emacs_value *symbol, emacs_value *data)
0956     EMACS_ATTRIBUTE_NONNULL(1, 2, 3);
0957 
0958   void (*non_local_exit_signal) (emacs_env *env,
0959                  emacs_value symbol, emacs_value data)
0960     EMACS_ATTRIBUTE_NONNULL(1);
0961 
0962   void (*non_local_exit_throw) (emacs_env *env,
0963                 emacs_value tag, emacs_value value)
0964     EMACS_ATTRIBUTE_NONNULL(1);
0965 
0966   /* Function registration.  */
0967 
0968   emacs_value (*make_function) (emacs_env *env,
0969                 ptrdiff_t min_arity,
0970                 ptrdiff_t max_arity,
0971                 emacs_value (*func) (emacs_env *env,
0972                                                      ptrdiff_t nargs,
0973                                                      emacs_value* args,
0974                                                      void *data)
0975                   EMACS_NOEXCEPT
0976                                   EMACS_ATTRIBUTE_NONNULL(1),
0977                 const char *docstring,
0978                 void *data)
0979     EMACS_ATTRIBUTE_NONNULL(1, 4);
0980 
0981   emacs_value (*funcall) (emacs_env *env,
0982                           emacs_value func,
0983                           ptrdiff_t nargs,
0984                           emacs_value* args)
0985     EMACS_ATTRIBUTE_NONNULL(1);
0986 
0987   emacs_value (*intern) (emacs_env *env, const char *name)
0988     EMACS_ATTRIBUTE_NONNULL(1, 2);
0989 
0990   /* Type conversion.  */
0991 
0992   emacs_value (*type_of) (emacs_env *env, emacs_value arg)
0993     EMACS_ATTRIBUTE_NONNULL(1);
0994 
0995   bool (*is_not_nil) (emacs_env *env, emacs_value arg)
0996     EMACS_ATTRIBUTE_NONNULL(1);
0997 
0998   bool (*eq) (emacs_env *env, emacs_value a, emacs_value b)
0999     EMACS_ATTRIBUTE_NONNULL(1);
1000 
1001   intmax_t (*extract_integer) (emacs_env *env, emacs_value arg)
1002     EMACS_ATTRIBUTE_NONNULL(1);
1003 
1004   emacs_value (*make_integer) (emacs_env *env, intmax_t n)
1005     EMACS_ATTRIBUTE_NONNULL(1);
1006 
1007   double (*extract_float) (emacs_env *env, emacs_value arg)
1008     EMACS_ATTRIBUTE_NONNULL(1);
1009 
1010   emacs_value (*make_float) (emacs_env *env, double d)
1011     EMACS_ATTRIBUTE_NONNULL(1);
1012 
1013   /* Copy the content of the Lisp string VALUE to BUFFER as an utf8
1014      null-terminated string.
1015 
1016      SIZE must point to the total size of the buffer.  If BUFFER is
1017      NULL or if SIZE is not big enough, write the required buffer size
1018      to SIZE and return true.
1019 
1020      Note that SIZE must include the last null byte (e.g. "abc" needs
1021      a buffer of size 4).
1022 
1023      Return true if the string was successfully copied.  */
1024 
1025   bool (*copy_string_contents) (emacs_env *env,
1026                                 emacs_value value,
1027                                 char *buf,
1028                                 ptrdiff_t *len)
1029     EMACS_ATTRIBUTE_NONNULL(1, 4);
1030 
1031   /* Create a Lisp string from a utf8 encoded string.  */
1032   emacs_value (*make_string) (emacs_env *env,
1033                   const char *str, ptrdiff_t len)
1034     EMACS_ATTRIBUTE_NONNULL(1, 2);
1035 
1036   /* Embedded pointer type.  */
1037   emacs_value (*make_user_ptr) (emacs_env *env,
1038                 void (*fin) (void *) EMACS_NOEXCEPT,
1039                 void *ptr)
1040     EMACS_ATTRIBUTE_NONNULL(1);
1041 
1042   void *(*get_user_ptr) (emacs_env *env, emacs_value arg)
1043     EMACS_ATTRIBUTE_NONNULL(1);
1044   void (*set_user_ptr) (emacs_env *env, emacs_value arg, void *ptr)
1045     EMACS_ATTRIBUTE_NONNULL(1);
1046 
1047   void (*(*get_user_finalizer) (emacs_env *env, emacs_value uptr))
1048     (void *) EMACS_NOEXCEPT EMACS_ATTRIBUTE_NONNULL(1);
1049   void (*set_user_finalizer) (emacs_env *env, emacs_value arg,
1050                   void (*fin) (void *) EMACS_NOEXCEPT)
1051     EMACS_ATTRIBUTE_NONNULL(1);
1052 
1053   /* Vector functions.  */
1054   emacs_value (*vec_get) (emacs_env *env, emacs_value vector, ptrdiff_t index)
1055     EMACS_ATTRIBUTE_NONNULL(1);
1056 
1057   void (*vec_set) (emacs_env *env, emacs_value vector, ptrdiff_t index,
1058            emacs_value value)
1059     EMACS_ATTRIBUTE_NONNULL(1);
1060 
1061   ptrdiff_t (*vec_size) (emacs_env *env, emacs_value vector)
1062     EMACS_ATTRIBUTE_NONNULL(1);
1063 
1064   /* Returns whether a quit is pending.  */
1065   bool (*should_quit) (emacs_env *env)
1066     EMACS_ATTRIBUTE_NONNULL(1);
1067 
1068   /* Processes pending input events and returns whether the module
1069      function should quit.  */
1070   enum emacs_process_input_result (*process_input) (emacs_env *env)
1071     EMACS_ATTRIBUTE_NONNULL (1);
1072 
1073   struct timespec (*extract_time) (emacs_env *env, emacs_value arg)
1074     EMACS_ATTRIBUTE_NONNULL (1);
1075 
1076   emacs_value (*make_time) (emacs_env *env, struct timespec time)
1077     EMACS_ATTRIBUTE_NONNULL (1);
1078 
1079   bool (*extract_big_integer) (emacs_env *env, emacs_value arg, int *sign,
1080                                ptrdiff_t *count, emacs_limb_t *magnitude)
1081     EMACS_ATTRIBUTE_NONNULL (1);
1082 
1083   emacs_value (*make_big_integer) (emacs_env *env, int sign, ptrdiff_t count,
1084                                    const emacs_limb_t *magnitude)
1085     EMACS_ATTRIBUTE_NONNULL (1);
1086 
1087   void (*(*EMACS_ATTRIBUTE_NONNULL (1)
1088             get_function_finalizer) (emacs_env *env,
1089                                      emacs_value arg)) (void *) EMACS_NOEXCEPT;
1090 
1091   void (*set_function_finalizer) (emacs_env *env, emacs_value arg,
1092                                   void (*fin) (void *) EMACS_NOEXCEPT)
1093     EMACS_ATTRIBUTE_NONNULL (1);
1094 
1095   int (*open_channel) (emacs_env *env, emacs_value pipe_process)
1096     EMACS_ATTRIBUTE_NONNULL (1);
1097 
1098   void (*make_interactive) (emacs_env *env, emacs_value function,
1099                             emacs_value spec)
1100     EMACS_ATTRIBUTE_NONNULL (1);
1101 
1102   /* Create a unibyte Lisp string from a string.  */
1103   emacs_value (*make_unibyte_string) (emacs_env *env,
1104                       const char *str, ptrdiff_t len)
1105     EMACS_ATTRIBUTE_NONNULL(1, 2);
1106 
1107 
1108   /* Add module environment functions newly added in Emacs 30 here.
1109      Before Emacs 30 is released, remove this comment and start
1110      module-env-31.h on the master branch.  */
1111 };
1112 
1113 /* Every module should define a function as follows.  */
1114 extern int emacs_module_init (struct emacs_runtime *runtime)
1115   EMACS_NOEXCEPT
1116   EMACS_ATTRIBUTE_NONNULL (1);
1117 
1118 #ifdef __cplusplus
1119 }
1120 #endif
1121 
1122 #endif /* EMACS_MODULE_H */