Function rb_string_value_cstr

Source
pub unsafe extern "C" fn rb_string_value_cstr(
    ptr: *mut VALUE,
) -> *mut c_char
Expand description

Identical to rb_string_value_ptr, except it additionally checks for the contents for viability as a C string. Ruby can accept wider range of contents as strings, compared to C. This function is to check that.

ยง@param[in,out] ptr Pointer to a variable of target object. @exception rb_eTypeError No implicit conversion to String. @exception rb_eArgError String is not C-compatible. @post *ptr is the return value of obj.to_str. @return Pointer to the contents of the return value.

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