Function ion_c_sys::ion_decimal_from_number[][src]

pub unsafe extern "C" fn ion_decimal_from_number(
    value: *mut ION_DECIMAL,
    number: *mut decNumber
) -> iERR
Expand description

Represents the given decNumber as an ION_DECIMAL. This function does not allocate or copy any memory, so the caller IS required to keep the given decNumber in scope for the lifetime of the resulting ION_DECIMAL. If desired, the caller can alleviate this requirement by calling ion_decimal_claim on the resulting ION_DECIMAL (note that this forces a copy). It is the caller’s responsibility to eventually free any dynamically allocated memory used by the given decNumber (calling ion_decimal_free will not free this memory).

@return IERR_OK (no errors are possible).