emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 a63d1ec: Don't reject module calls with no argume


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 a63d1ec: Don't reject module calls with no arguments
Date: Sat, 28 Nov 2015 12:00:36 +0000

branch: emacs-25
commit a63d1eca8de317b85e59732f8628eae52250901a
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Don't reject module calls with no arguments
    
    * src/emacs-module.c (Finternal_module_call): Allow ARGLIST be nil.
---
 src/emacs-module.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/emacs-module.c b/src/emacs-module.c
index 76c9098..403e7d2 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -777,13 +777,14 @@ DEFUN ("module-load", Fmodule_load, Smodule_load, 1, 1, 0,
 DEFUN ("internal--module-call", Finternal_module_call, Sinternal_module_call, 
2, 2, 0,
        doc: /* Internal function to call a module function.
 ENVOBJ is a save pointer to a module_fun_env structure.
-ARGLIST is a list of arguments passed to SUBRPTR.  */)
+ARGLIST is a list of arguments passed to SUBRPTR, or nil.  */)
   (Lisp_Object envobj, Lisp_Object arglist)
 {
   CHECK_TYPE (SAVE_VALUEP (envobj), Qsave_value_p, envobj);
   struct Lisp_Save_Value *save_value = XSAVE_VALUE (envobj);
   CHECK_TYPE (save_type (save_value, 0) == SAVE_POINTER, Qsave_pointer_p, 
envobj);
-  CHECK_CONS (arglist);
+  if (!NILP (arglist))
+    CHECK_CONS (arglist);
   struct module_fun_env *envptr = XSAVE_POINTER (envobj, 0);
   EMACS_INT len = XFASTINT (Flength (arglist));
   eassume (0 <= envptr->min_arity);



reply via email to

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