rb_num2uint

Function rb_num2uint 

Source
pub unsafe extern "C" fn rb_num2uint(num: VALUE) -> c_ulong
Expand description

Converts an instance of ::rb_cNumeric into C’s unsigned long.

@param[in] num Something numeric. @exception rb_eTypeError num is not a numeric. @exception rb_eRangeError num is out of range of unsigned int. @return The passed value converted into C’s unsigned long.

@internal

§Yes, the API is really strange. It returns unsigned long, but raises when the value is out of unsigned int. This seems to be due to the fact that Matz favoured K&R before, and his machine at that moment was an ILP32 architecture.

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