aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/emacs-module.c10
-rw-r--r--src/lisp.h13
2 files changed, 10 insertions, 13 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c
index afb75e351d2..adb09c0c506 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -349,6 +349,16 @@ module_non_local_exit_throw (emacs_env *env, emacs_value tag, emacs_value value)
349 value_to_lisp (value)); 349 value_to_lisp (value));
350} 350}
351 351
352static struct Lisp_Module_Function *
353allocate_module_function (void)
354{
355 return ALLOCATE_PSEUDOVECTOR (struct Lisp_Module_Function,
356 min_arity, PVEC_MODULE_FUNCTION);
357}
358
359#define XSET_MODULE_FUNCTION(var, ptr) \
360 XSETPSEUDOVECTOR (var, ptr, PVEC_MODULE_FUNCTION)
361
352/* A module function is a pseudovector of subtype 362/* A module function is a pseudovector of subtype
353 PVEC_MODULE_FUNCTION; see lisp.h for the definition. */ 363 PVEC_MODULE_FUNCTION; see lisp.h for the definition. */
354 364
diff --git a/src/lisp.h b/src/lisp.h
index ee703893e22..900c7c5cc3f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3925,16 +3925,6 @@ struct Lisp_Module_Function
3925 void *data; 3925 void *data;
3926}; 3926};
3927 3927
3928INLINE struct Lisp_Module_Function *
3929allocate_module_function (void)
3930{
3931 return ALLOCATE_PSEUDOVECTOR (struct Lisp_Module_Function,
3932 /* Name of the first field to be
3933 ignored by GC. */
3934 min_arity,
3935 PVEC_MODULE_FUNCTION);
3936}
3937
3938INLINE bool 3928INLINE bool
3939MODULE_FUNCTIONP (Lisp_Object o) 3929MODULE_FUNCTIONP (Lisp_Object o)
3940{ 3930{
@@ -3948,9 +3938,6 @@ XMODULE_FUNCTION (Lisp_Object o)
3948 return XUNTAG (o, Lisp_Vectorlike); 3938 return XUNTAG (o, Lisp_Vectorlike);
3949} 3939}
3950 3940
3951#define XSET_MODULE_FUNCTION(var, ptr) \
3952 (XSETPSEUDOVECTOR (var, ptr, PVEC_MODULE_FUNCTION))
3953
3954#ifdef HAVE_MODULES 3941#ifdef HAVE_MODULES
3955/* Defined in alloc.c. */ 3942/* Defined in alloc.c. */
3956extern Lisp_Object make_user_ptr (void (*finalizer) (void *), void *p); 3943extern Lisp_Object make_user_ptr (void (*finalizer) (void *), void *p);