diff options
Diffstat (limited to 'include/ruby/internal/intern')
-rw-r--r-- | include/ruby/internal/intern/error.h | 27 | ||||
-rw-r--r-- | include/ruby/internal/intern/string.h | 15 |
2 files changed, 2 insertions, 40 deletions
diff --git a/include/ruby/internal/intern/error.h b/include/ruby/internal/intern/error.h index c56db91b4f..2ca51d0111 100644 --- a/include/ruby/internal/intern/error.h +++ b/include/ruby/internal/intern/error.h @@ -237,9 +237,6 @@ RBIMPL_ATTR_NORETURN() */ void rb_error_arity(int argc, int min, int max); -bool rb_str_chilled_p(VALUE str); -void rb_str_modify(VALUE str); - RBIMPL_SYMBOL_EXPORT_END() /** @@ -247,30 +244,10 @@ RBIMPL_SYMBOL_EXPORT_END() * * Does anyone use this? Remain not deleted for compatibility. */ -#define rb_check_frozen_internal(obj) do { \ - VALUE frozen_obj = (obj); \ - if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { \ - rb_error_frozen_object(frozen_obj); \ - } \ - if (RB_UNLIKELY(rb_str_chilled_p(frozen_obj))) { \ - rb_str_modify(frozen_obj); \ - } \ - } while (0) - -/** @alias{rb_check_frozen} */ -static inline void -rb_check_frozen_inline(VALUE obj) -{ - if (rb_str_chilled_p(obj)) { - rb_str_modify(obj); - } - if (RB_UNLIKELY(RB_OBJ_FROZEN(obj))) { - rb_error_frozen_object(obj); - } -} +#define rb_check_frozen_internal rb_check_frozen /** @alias{rb_check_frozen} */ -#define rb_check_frozen rb_check_frozen_inline +#define rb_check_frozen_inline rb_check_frozen /** * Ensures that the passed integer is in the passed range. When you can use diff --git a/include/ruby/internal/intern/string.h b/include/ruby/internal/intern/string.h index 6827563e8d..37dee45527 100644 --- a/include/ruby/internal/intern/string.h +++ b/include/ruby/internal/intern/string.h @@ -602,21 +602,6 @@ VALUE rb_str_dup(VALUE str); VALUE rb_str_resurrect(VALUE str); /** - * Returns whether a string is chilled or not. - * - * This function is temporary and users must check for its presence using - * #ifdef HAVE_RB_STR_CHILLED_P. If HAVE_RB_STR_CHILLED_P is not defined, then - * strings can't be chilled. - * - * @param[in] str A string. - * @retval 1 The string is chilled. - * @retval 0 Otherwise. - */ -bool rb_str_chilled_p(VALUE str); - -#define HAVE_RB_STR_CHILLED_P 1 - -/** * Obtains a "temporary lock" of the string. This advisory locking mechanism * prevents other cooperating threads from tampering the receiver. The same * thing could be done via freeze mechanism, but this one can also be unlocked |