emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 7d00410: Add handlerlist assertion to module code


From: Paul Eggert
Subject: [Emacs-diffs] master 7d00410: Add handlerlist assertion to module code
Date: Fri, 19 May 2017 19:15:25 -0400 (EDT)

branch: master
commit 7d00410af69b3cbbf0e8fc9765f3bf9f5616286d
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Add handlerlist assertion to module code
    
    * src/emacs-module.c (module_reset_handlerlist):
    Check handlerlist.  Suggested by Philipp Stephani in:
    http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html
---
 src/emacs-module.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/emacs-module.c b/src/emacs-module.c
index 5aa8a88..0bc1b6c 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -918,10 +918,12 @@ finalize_environment (struct emacs_env_private *env)
 /* Must be called after setting up a handler immediately before
    returning from the function.  See the comments in lisp.h and the
    code in eval.c for details.  The macros below arrange for this
-   function to be called automatically.  DUMMY is ignored.  */
+   function to be called automatically.  PHANDLERLIST points to a word
+   containing the handler list, for sanity checking.  */
 static void
-module_reset_handlerlist (struct handler *const *dummy)
+module_reset_handlerlist (struct handler *const *phandlerlist)
 {
+  eassert (handlerlist == *phandlerlist);
   handlerlist = handlerlist->next;
 }
 



reply via email to

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