From 3bab927884c4b795f8545b632328b5d3b632eed3 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sun, 2 Jul 2017 13:15:52 +0200 Subject: [PATCH] Remove FIXME comments about sentinel values These FIXMEs can't be addressed because they would require breaking changes to the module API. Furthermore, other module functions don't return sentinel values as well, so users generally have to call non_local_exit_check anyway. * src/emacs-module.c (module_set_user_ptr) (module_set_user_finalizer, module_vec_set, module_vec_size): Remove FIXME comments. --- src/emacs-module.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/emacs-module.c b/src/emacs-module.c index 9e072029cc1..7b1a402eeff 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -601,7 +601,6 @@ module_get_user_ptr (emacs_env *env, emacs_value uptr) static void module_set_user_ptr (emacs_env *env, emacs_value uptr, void *ptr) { - /* FIXME: This function should return bool because it can fail. */ MODULE_FUNCTION_BEGIN (); Lisp_Object lisp = value_to_lisp (uptr); CHECK_USER_PTR (lisp); @@ -621,7 +620,6 @@ static void module_set_user_finalizer (emacs_env *env, emacs_value uptr, emacs_finalizer_function fin) { - /* FIXME: This function should return bool because it can fail. */ MODULE_FUNCTION_BEGIN (); Lisp_Object lisp = value_to_lisp (uptr); CHECK_USER_PTR (lisp); @@ -640,7 +638,6 @@ check_vec_index (Lisp_Object lvec, ptrdiff_t i) static void module_vec_set (emacs_env *env, emacs_value vec, ptrdiff_t i, emacs_value val) { - /* FIXME: This function should return bool because it can fail. */ MODULE_FUNCTION_BEGIN (); Lisp_Object lvec = value_to_lisp (vec); check_vec_index (lvec, i); @@ -659,7 +656,6 @@ module_vec_get (emacs_env *env, emacs_value vec, ptrdiff_t i) static ptrdiff_t module_vec_size (emacs_env *env, emacs_value vec) { - /* FIXME: Return a sentinel value (e.g., -1) on error. */ MODULE_FUNCTION_BEGIN (0); Lisp_Object lvec = value_to_lisp (vec); CHECK_VECTOR (lvec); -- 2.39.2