Branch data Line data Source code
1 : : #include "mem.h"
2 : : #include "mem_internal.h"
3 : :
4 : : /**
5 : : * @brief Append exact bytes from a bounded source buffer to a data descriptor
6 : : *
7 : : * This public append helper is a thin wrapper around @ref mem_core_buffer in
8 : : * append mode. The exact-byte contract, self-aliasing rules, and validation of
9 : : * data-mode destinations are all handled by the shared internal core
10 : : *
11 : : * @param destination Pointer to the destination descriptor receiving appended data
12 : : * @param source_buffer_size_bytes Total bytes available in @p source_buffer
13 : : * @param source_buffer Pointer to source bytes
14 : : * @return `SUCCESS` on success; `FAILURE` otherwise
15 : : */
16 : 5 : Return mem_concat_buffer(
17 : : memory *destination,
18 : : const size_t source_buffer_size_bytes,
19 : : const void *const source_buffer)
20 : : {
21 : 5 : return(mem_core_buffer(
22 : : TRANSFER_APPEND,
23 : : destination,
24 : : source_buffer_size_bytes,
25 : : source_buffer));
26 : : }
|