1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 20:00:46 -08:00
emacs/src/module-env-25.h
Philipp Stephani 94fa7ceb48 Make argument names in module interface more consistent.
Previously, the names of arguments and other details were needlessly
inconsistent between the documentation, the declarations, and the
definitions, as well as between each other.  This commit makes them
more consistent, in most cases by applying the names from the
documentation everywhere.

* src/module-env-27.h:
* src/module-env-25.h:
* src/emacs-module.h.in:
* src/emacs-module.c (module_get_environment)
(module_make_global_ref, module_free_global_ref)
(module_non_local_exit_get, module_non_local_exit_signal)
(module_make_function, module_funcall, module_type_of)
(module_is_not_nil, module_extract_integer)
(module_extract_float, module_copy_string_contents)
(module_make_string, module_vec_set, module_vec_get)
(module_vec_size, module_extract_time)
(module_assert_runtime):
* doc/lispref/internals.texi (Module Initialization)
(Module Functions, Module Values): Make argument names and some other
details consistent.  No functional changes.
2019-12-23 17:16:10 +01:00

131 lines
4.2 KiB
C

/* Structure size (for version checking). */
ptrdiff_t size;
/* Private data; users should not touch this. */
struct emacs_env_private *private_members;
/* Memory management. */
emacs_value (*make_global_ref) (emacs_env *env, emacs_value value)
EMACS_ATTRIBUTE_NONNULL(1);
void (*free_global_ref) (emacs_env *env, emacs_value global_value)
EMACS_ATTRIBUTE_NONNULL(1);
/* Non-local exit handling. */
enum emacs_funcall_exit (*non_local_exit_check) (emacs_env *env)
EMACS_ATTRIBUTE_NONNULL(1);
void (*non_local_exit_clear) (emacs_env *env)
EMACS_ATTRIBUTE_NONNULL(1);
enum emacs_funcall_exit (*non_local_exit_get)
(emacs_env *env, emacs_value *symbol, emacs_value *data)
EMACS_ATTRIBUTE_NONNULL(1, 2, 3);
void (*non_local_exit_signal) (emacs_env *env,
emacs_value symbol, emacs_value data)
EMACS_ATTRIBUTE_NONNULL(1);
void (*non_local_exit_throw) (emacs_env *env,
emacs_value tag, emacs_value value)
EMACS_ATTRIBUTE_NONNULL(1);
/* Function registration. */
emacs_value (*make_function) (emacs_env *env,
ptrdiff_t min_arity,
ptrdiff_t max_arity,
emacs_value (*func) (emacs_env *env,
ptrdiff_t nargs,
emacs_value* args,
void *data)
EMACS_NOEXCEPT
EMACS_ATTRIBUTE_NONNULL(1),
const char *docstring,
void *data)
EMACS_ATTRIBUTE_NONNULL(1, 4);
emacs_value (*funcall) (emacs_env *env,
emacs_value func,
ptrdiff_t nargs,
emacs_value* args)
EMACS_ATTRIBUTE_NONNULL(1);
emacs_value (*intern) (emacs_env *env, const char *name)
EMACS_ATTRIBUTE_NONNULL(1, 2);
/* Type conversion. */
emacs_value (*type_of) (emacs_env *env, emacs_value arg)
EMACS_ATTRIBUTE_NONNULL(1);
bool (*is_not_nil) (emacs_env *env, emacs_value arg)
EMACS_ATTRIBUTE_NONNULL(1);
bool (*eq) (emacs_env *env, emacs_value a, emacs_value b)
EMACS_ATTRIBUTE_NONNULL(1);
intmax_t (*extract_integer) (emacs_env *env, emacs_value arg)
EMACS_ATTRIBUTE_NONNULL(1);
emacs_value (*make_integer) (emacs_env *env, intmax_t n)
EMACS_ATTRIBUTE_NONNULL(1);
double (*extract_float) (emacs_env *env, emacs_value arg)
EMACS_ATTRIBUTE_NONNULL(1);
emacs_value (*make_float) (emacs_env *env, double d)
EMACS_ATTRIBUTE_NONNULL(1);
/* Copy the content of the Lisp string VALUE to BUFFER as an utf8
NUL-terminated string.
SIZE must point to the total size of the buffer. If BUFFER is
NULL or if SIZE is not big enough, write the required buffer size
to SIZE and return true.
Note that SIZE must include the last NUL byte (e.g. "abc" needs
a buffer of size 4).
Return true if the string was successfully copied. */
bool (*copy_string_contents) (emacs_env *env,
emacs_value value,
char *buf,
ptrdiff_t *len)
EMACS_ATTRIBUTE_NONNULL(1, 4);
/* Create a Lisp string from a utf8 encoded string. */
emacs_value (*make_string) (emacs_env *env,
const char *str, ptrdiff_t len)
EMACS_ATTRIBUTE_NONNULL(1, 2);
/* Embedded pointer type. */
emacs_value (*make_user_ptr) (emacs_env *env,
void (*fin) (void *) EMACS_NOEXCEPT,
void *ptr)
EMACS_ATTRIBUTE_NONNULL(1);
void *(*get_user_ptr) (emacs_env *env, emacs_value arg)
EMACS_ATTRIBUTE_NONNULL(1);
void (*set_user_ptr) (emacs_env *env, emacs_value arg, void *ptr)
EMACS_ATTRIBUTE_NONNULL(1);
void (*(*get_user_finalizer) (emacs_env *env, emacs_value uptr))
(void *) EMACS_NOEXCEPT EMACS_ATTRIBUTE_NONNULL(1);
void (*set_user_finalizer) (emacs_env *env, emacs_value arg,
void (*fin) (void *) EMACS_NOEXCEPT)
EMACS_ATTRIBUTE_NONNULL(1);
/* Vector functions. */
emacs_value (*vec_get) (emacs_env *env, emacs_value vector, ptrdiff_t index)
EMACS_ATTRIBUTE_NONNULL(1);
void (*vec_set) (emacs_env *env, emacs_value vector, ptrdiff_t index,
emacs_value value)
EMACS_ATTRIBUTE_NONNULL(1);
ptrdiff_t (*vec_size) (emacs_env *env, emacs_value vector)
EMACS_ATTRIBUTE_NONNULL(1);