Skip to main content

realloc_binary

Function realloc_binary 

Source
pub unsafe fn realloc_binary(bin: *mut Binary, size: usize) -> c_int
Expand description

Resizes a mutable binary.

Changes bin to size bytes, preserving the existing data up to the smaller of the two lengths. If bin currently refers to read-only data it is left untouched and a fresh mutable copy is assigned in its place. Returns a non-zero value on success or 0 on failure.

enif_realloc_binary — NIF 1.0 — OTP R13B04