Function rb_obj_alloc

Source
pub unsafe extern "C" fn rb_obj_alloc(klass: VALUE) -> VALUE
Expand description

Allocates an instance of the given class.

ยง@param[in] klass A class to instantiate. @exception rb_eTypeError klass is not a class. @return An allocated, not yet initialised instance of klass. @note It calls the allocator defined by rb_define_alloc_func. You cannot use this function to define an allocator. Use rb_newobj_of, #TypedData_Make_Struct or others, instead. @note Usually prefer rb_class_new_instance to rb_obj_alloc and rb_obj_call_init. @see rb_class_new_instance @see rb_obj_call_init @see rb_define_alloc_func @see rb_newobj_of @see #TypedData_Make_Struct

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3