emacs-diffs
[Top][All Lists]
Advanced

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

master 7d9096b: Small refactoring to simplify the interface of internal


From: Philipp Stephani
Subject: master 7d9096b: Small refactoring to simplify the interface of internal function.
Date: Sun, 26 Jul 2020 14:35:10 -0400 (EDT)

branch: master
commit 7d9096b6ac5ffa836fa5a8ceec2d27edc482f7ae
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    Small refactoring to simplify the interface of internal function.
    
    * src/emacs-module.c (allocate_emacs_value): Remove STORAGE parameter.
    (lisp_to_value): Adapt caller.
---
 src/emacs-module.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/emacs-module.c b/src/emacs-module.c
index e4e7da0..ac9ac82 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -190,7 +190,7 @@ struct emacs_runtime_private
 /* Forward declarations.  */
 
 static Lisp_Object value_to_lisp (emacs_value);
-static emacs_value allocate_emacs_value (emacs_env *, struct 
emacs_value_storage *, Lisp_Object);
+static emacs_value allocate_emacs_value (emacs_env *, Lisp_Object);
 static emacs_value lisp_to_value (emacs_env *, Lisp_Object);
 static enum emacs_funcall_exit module_non_local_exit_check (emacs_env *);
 static void module_assert_thread (void);
@@ -1321,7 +1321,7 @@ lisp_to_value (emacs_env *env, Lisp_Object o)
   struct emacs_env_private *p = env->private_members;
   if (p->pending_non_local_exit != emacs_funcall_exit_return)
     return NULL;
-  return allocate_emacs_value (env, &p->storage, o);
+  return allocate_emacs_value (env, o);
 }
 
 /* Must be called for each frame before it can be used for allocation.  */
@@ -1358,9 +1358,9 @@ finalize_storage (struct emacs_value_storage *storage)
 /* Allocate a new value from STORAGE and stores OBJ in it.  Return
    NULL if allocation fails and use ENV for non local exit reporting.  */
 static emacs_value
-allocate_emacs_value (emacs_env *env, struct emacs_value_storage *storage,
-                     Lisp_Object obj)
+allocate_emacs_value (emacs_env *env, Lisp_Object obj)
 {
+  struct emacs_value_storage *storage = &env->private_members->storage;
   eassert (storage->current);
   eassert (storage->current->offset < value_frame_size);
   eassert (! storage->current->next);



reply via email to

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