Function libyml::internal::yaml_queue_extend
source · pub unsafe fn yaml_queue_extend(
start: *mut *mut c_void,
head: *mut *mut c_void,
tail: *mut *mut c_void,
end: *mut *mut c_void,
)
Expand description
Extend a queue by reallocating and copying the existing data.
This function is used to grow a queue when more space is needed.
§Safety
- This function is unsafe because it directly calls the system’s
realloc
andmemmove
functions, which can lead to undefined behaviour if misused. - The caller must ensure that
start
,head
,tail
, andend
are valid pointers into the same allocated memory block. - The caller must ensure that the memory block being extended is large enough to accommodate the new size.
- The caller is responsible for properly freeing the extended memory block using
the corresponding
yaml_free
function when it is no longer needed.