From: Philipp Stephani Date: Sun, 26 Jul 2020 18:34:30 +0000 (+0200) Subject: Small refactoring to simplify the interface of internal function. X-Git-Tag: emacs-28.0.90~6933 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7d9096b6ac5ffa836fa5a8ceec2d27edc482f7ae;p=emacs.git Small refactoring to simplify the interface of internal function. * src/emacs-module.c (allocate_emacs_value): Remove STORAGE parameter. (lisp_to_value): Adapt caller. --- diff --git a/src/emacs-module.c b/src/emacs-module.c index e4e7da088d7..ac9ac824b7b 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);