diff options
author | Alan Wu <[email protected]> | 2024-07-16 18:21:14 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2024-07-17 10:25:20 -0400 |
commit | 99825a539f990dff7e0d7cae082ab195a82ffaa5 (patch) | |
tree | 7a64faa69d25488365ae5c08505e206bfa591819 | |
parent | cd428b490d635726e3d39ae8aa896bc41708cbc4 (diff) |
[DOC] Note that rb_obj_freeze_inline() can raise NoMemoryError
And move it back to a public header because Doxygen might not be
scanning the .c files.
[Feature #18776]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11179
-rw-r--r-- | include/ruby/internal/fl_type.h | 8 | ||||
-rw-r--r-- | variable.c | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h index 0a05166784..2a8bdccd46 100644 --- a/include/ruby/internal/fl_type.h +++ b/include/ruby/internal/fl_type.h @@ -906,6 +906,14 @@ RB_OBJ_FROZEN(VALUE obj) } RUBY_SYMBOL_EXPORT_BEGIN +/** + * Prevents further modifications to the given object. ::rb_eFrozenError shall + * be raised if modification is attempted. + * + * @param[out] x Object in question. + * @exception rb_eNoMemError Failed to allocate memory for the frozen + * representation of the object. + */ void rb_obj_freeze_inline(VALUE obj); RUBY_SYMBOL_EXPORT_END diff --git a/variable.c b/variable.c index 8be3d9fdb5..0dfc5cb7b8 100644 --- a/variable.c +++ b/variable.c @@ -1806,12 +1806,6 @@ rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id) return true; } -/** - * Prevents further modifications to the given object. ::rb_eFrozenError shall - * be raised if modification is attempted. - * - * @param[out] x Object in question. - */ void rb_obj_freeze_inline(VALUE x) { if (RB_FL_ABLE(x)) { |