aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-03-02 14:31:01 -0800
committerPaul Eggert2016-03-02 14:31:21 -0800
commit227ab51db6517bda1a557391bebaa7882b51963e (patch)
tree11d48b51d3f0f998cef59bbfea788f6ac18179f4 /src
parent58400688640a841ba50ad4a48bfaea4d7862ad08 (diff)
downloademacs-227ab51db6517bda1a557391bebaa7882b51963e.tar.gz
emacs-227ab51db6517bda1a557391bebaa7882b51963e.zip
emacs-module.h slight simplification
* src/emacs-module.c (emacs_init_function, emacs_subr): Move here ... * src/emacs-module.h: ... from here, as they don’t need to be public. (enum emacs_arity): Remove useless enum tag. The enum value is used in ptrdiff_t contexts. * src/emacs-module.c (CHECK_USER_PTR): Fix typo in previous change.
Diffstat (limited to 'src')
-rw-r--r--src/emacs-module.c7
-rw-r--r--src/emacs-module.h9
2 files changed, 8 insertions, 8 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c
index 1fec6d10a99..a459ab84cf5 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -64,6 +64,13 @@ enum
64 && INTPTR_MAX == EMACS_INT_MAX) 64 && INTPTR_MAX == EMACS_INT_MAX)
65 }; 65 };
66 66
67/* Function prototype for the module init function. */
68typedef int (*emacs_init_function) (struct emacs_runtime *);
69
70/* Function prototype for the module Lisp functions. */
71typedef emacs_value (*emacs_subr) (emacs_env *, ptrdiff_t,
72 emacs_value [], void *);
73
67/* Function prototype for module user-pointer finalizers. These 74/* Function prototype for module user-pointer finalizers. These
68 should not throw C++ exceptions, so emacs-module.h declares the 75 should not throw C++ exceptions, so emacs-module.h declares the
69 corresponding interfaces with EMACS_NOEXCEPT. There is only C code 76 corresponding interfaces with EMACS_NOEXCEPT. There is only C code
diff --git a/src/emacs-module.h b/src/emacs-module.h
index 575966ea7b5..13dcca0706e 100644
--- a/src/emacs-module.h
+++ b/src/emacs-module.h
@@ -41,7 +41,7 @@ typedef struct emacs_env_25 emacs_env;
41 BEWARE: Do not assume NULL is a valid value! */ 41 BEWARE: Do not assume NULL is a valid value! */
42typedef struct emacs_value_tag *emacs_value; 42typedef struct emacs_value_tag *emacs_value;
43 43
44enum emacs_arity { emacs_variadic_function = -2 }; 44enum { emacs_variadic_function = -2 };
45 45
46/* Struct passed to a module init function (emacs_module_init). */ 46/* Struct passed to a module init function (emacs_module_init). */
47struct emacs_runtime 47struct emacs_runtime
@@ -57,13 +57,6 @@ struct emacs_runtime
57}; 57};
58 58
59 59
60/* Function prototype for the module init function. */
61typedef int (*emacs_init_function) (struct emacs_runtime *ert);
62
63/* Function prototype for the module Lisp functions. */
64typedef emacs_value (*emacs_subr) (emacs_env *env, ptrdiff_t nargs,
65 emacs_value args[], void *data);
66
67/* Possible Emacs function call outcomes. */ 60/* Possible Emacs function call outcomes. */
68enum emacs_funcall_exit 61enum emacs_funcall_exit
69{ 62{