[][src]Function lexical_core::set_nan_string_ffi

#[no_mangle]
pub unsafe extern "C" fn set_nan_string_ffi(ptr: *const u8, size: usize) -> i32

Set representation of Not a Number from a pointer and size.

Returns 0 on success, -1 on error.

  • ptr - Pointer to the first character in the contiguous string.
  • size - Size of the string, without the null-terminator.

Safety

Only use this in C-FFI code, otherwise, you use set_nan_string. Do not call this function in threaded-code, as it is not thread-safe.

Panics

Panics if bytes.len() >= MAX_F32_SIZE.