pub unsafe extern "C" fn rb_obj_setup(
obj: VALUE,
klass: VALUE,
type_: VALUE,
) -> VALUEExpand description
Fills common fields in the object.
@note Prefer rb_newobj_of to this function.
@param[in,out] obj A Ruby object to be set up.
@param[in] klass obj will belong to this class.
@param[in] type One of ::ruby_value_type.
@return The passed object.
@internal
Historically, authors of Ruby has described the type argument as “one of
::ruby_value_type”. In reality it accepts either ::ruby_value_type,
::ruby_fl_type, or any combinations of the two. For instance
RUBY_T_STRING | RUBY_FL_FREEZE is a valid value that this function takes,
and means this is a frozen string.
§3rd party extension libraries rarely need to allocate Strings this way. They normally only concern ::RUBY_T_DATA. This argument is mainly used for specifying flags, @shyouhei suspects.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3