]> git.eshelyaron.com Git - emacs.git/commitdiff
Small refactoring to simplify the interface of internal function.
authorPhilipp Stephani <phst@google.com>
Sun, 26 Jul 2020 18:34:30 +0000 (20:34 +0200)
committerPhilipp Stephani <phst@google.com>
Sun, 26 Jul 2020 18:34:30 +0000 (20:34 +0200)
* src/emacs-module.c (allocate_emacs_value): Remove STORAGE parameter.
(lisp_to_value): Adapt caller.

src/emacs-module.c

index e4e7da088d7caf4c9a998d81d1f82bb102249260..ac9ac824b7b79ba4c7ccd0c7f9321e8d155584b0 100644 (file)
@@ -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);