Function rb_data_object_zalloc

Source
pub unsafe extern "C" fn rb_data_object_zalloc(
    klass: VALUE,
    size: size_t,
    dmark: RUBY_DATA_FUNC,
    dfree: RUBY_DATA_FUNC,
) -> VALUE
Expand description

Identical to rb_data_object_wrap, except it allocates a new data region internally instead of taking an existing one. The allocation is done using ruby_calloc(). Hence it makes no sense to pass anything other than ::RUBY_DEFAULT_FREE to the last argument.

ยง@param[in] klass Ruby level class of the returning object. @param[in] size Requested size of memory to allocate. @param[in] dmark Mark function. @param[in] dfree Free function. @exception rb_eTypeError klass is not a class. @exception rb_eNoMemError Out of memory. @return An allocated object that wraps a new size byte region.

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