diff options
author | Philipp Stephani <phst@google.com> | 2020-07-26 20:34:30 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2020-07-26 20:34:30 +0200 |
commit | 7d9096b6ac5ffa836fa5a8ceec2d27edc482f7ae (patch) | |
tree | 6f88029f3fca2965f54008888ba3df6a56aa9eff | |
parent | dae97708ea41f54f2974b405555816ada393fb9a (diff) | |
download | emacs-7d9096b6ac5ffa836fa5a8ceec2d27edc482f7ae.tar.gz |
Small refactoring to simplify the interface of internal function.
* src/emacs-module.c (allocate_emacs_value): Remove STORAGE parameter.
(lisp_to_value): Adapt caller.
-rw-r--r-- | src/emacs-module.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |