summaryrefslogtreecommitdiff
path: root/src/emacs-module.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-12-20 17:43:42 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-12-20 17:44:51 -0800
commite9916d8880561cc06b6cb73bafe7257b93ffbf4c (patch)
treea74f4ca73a26f18e697592d85f8e03dca4a035b1 /src/emacs-module.c
parent6cd051b31c3440486888f417e028554de7542fb0 (diff)
downloademacs-e9916d8880561cc06b6cb73bafe7257b93ffbf4c.tar.gz
Revert some recent emacs-module commentary
Most of the recently-added commentary was incorrect, due to the possibility of stack overflow.
Diffstat (limited to 'src/emacs-module.c')
-rw-r--r--src/emacs-module.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c
index 5d1b4dc8d6a..dca834973bd 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -86,7 +86,7 @@ struct emacs_env_private
struct emacs_runtime_private
{
/* FIXME: Ideally, we would just define "struct emacs_runtime_private"
- * as a synonym of "emacs_env", but I don't know how to do that in C. */
+ as a synonym of "emacs_env", but I don't know how to do that in C. */
emacs_env pub;
};
@@ -325,8 +325,7 @@ module_non_local_exit_get (emacs_env *env, emacs_value *sym, emacs_value *data)
struct emacs_env_private *p = env->private_members;
if (p->pending_non_local_exit != emacs_funcall_exit_return)
{
- /* FIXME: We cannot call lisp_to_value here because that can
- exit non-locally. */
+ /* FIXME: lisp_to_value can exit non-locally. */
*sym = lisp_to_value (p->non_local_exit_symbol);
*data = lisp_to_value (p->non_local_exit_data);
}
@@ -436,7 +435,6 @@ module_is_not_nil (emacs_env *env, emacs_value value)
check_main_thread ();
if (module_non_local_exit_check (env) != emacs_funcall_exit_return)
return false;
- /* Assume that NILP never exits non-locally. */
return ! NILP (value_to_lisp (value));
}
@@ -446,7 +444,6 @@ module_eq (emacs_env *env, emacs_value a, emacs_value b)
check_main_thread ();
if (module_non_local_exit_check (env) != emacs_funcall_exit_return)
return false;
- /* Assume that EQ never exits non-locally. */
return EQ (value_to_lisp (a), value_to_lisp (b));
}
@@ -893,7 +890,7 @@ value_to_lisp_bits (emacs_value v)
}
/* If V was computed from lisp_to_value (O), then return O.
- Must never fail or exit non-locally. */
+ Exits non-locally only if the stack overflows. */
static Lisp_Object
value_to_lisp (emacs_value v)
{
@@ -923,7 +920,7 @@ enum { HAVE_STRUCT_ATTRIBUTE_ALIGNED = 0 };
#endif
/* Convert O to an emacs_value. Allocate storage if needed; this can
- signal if memory is exhausted. Must be injective. */
+ signal if memory is exhausted. Must be an injective function. */
static emacs_value
lisp_to_value (Lisp_Object o)
{