[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]
This commit is contained in:
Alan Wu 2024-07-16 18:21:14 -04:00
Родитель cd428b490d
Коммит 99825a539f
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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)) {