emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 227ab51: emacs-module.h slight simplification


From: Paul Eggert
Subject: [Emacs-diffs] master 227ab51: emacs-module.h slight simplification
Date: Wed, 02 Mar 2016 22:31:28 +0000

branch: master
commit 227ab51db6517bda1a557391bebaa7882b51963e
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 src/emacs-module.c |    7 +++++++
 src/emacs-module.h |    9 +--------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/emacs-module.c b/src/emacs-module.c
index 1fec6d1..a459ab8 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -64,6 +64,13 @@ enum
         && INTPTR_MAX == EMACS_INT_MAX)
   };
 
+/* Function prototype for the module init function.  */
+typedef int (*emacs_init_function) (struct emacs_runtime *);
+
+/* Function prototype for the module Lisp functions.  */
+typedef emacs_value (*emacs_subr) (emacs_env *, ptrdiff_t,
+                                  emacs_value [], void *);
+
 /* Function prototype for module user-pointer finalizers.  These
    should not throw C++ exceptions, so emacs-module.h declares the
    corresponding interfaces with EMACS_NOEXCEPT.  There is only C code
diff --git a/src/emacs-module.h b/src/emacs-module.h
index 575966e..13dcca0 100644
--- a/src/emacs-module.h
+++ b/src/emacs-module.h
@@ -41,7 +41,7 @@ typedef struct emacs_env_25 emacs_env;
    BEWARE: Do not assume NULL is a valid value!  */
 typedef struct emacs_value_tag *emacs_value;
 
-enum emacs_arity { emacs_variadic_function = -2 };
+enum { emacs_variadic_function = -2 };
 
 /* Struct passed to a module init function (emacs_module_init).  */
 struct emacs_runtime
@@ -57,13 +57,6 @@ struct emacs_runtime
 };
 
 
-/* Function prototype for the module init function.  */
-typedef int (*emacs_init_function) (struct emacs_runtime *ert);
-
-/* Function prototype for the module Lisp functions.  */
-typedef emacs_value (*emacs_subr) (emacs_env *env, ptrdiff_t nargs,
-                                  emacs_value args[], void *data);
-
 /* Possible Emacs function call outcomes.  */
 enum emacs_funcall_exit
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]