gbuffer_append()
#
Appends a specified number of bytes from a given buffer to the gbuffer_t
structure, expanding its capacity if necessary.
Prototype
size_t gbuffer_append(
gbuffer_t *gbuf,
void *bf,
size_t len
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the |
|
|
Pointer to the buffer containing the data to append. |
|
|
Number of bytes to append from |
Return Value
Returns the number of bytes successfully appended to the gbuffer_t
.
Notes
If the gbuffer_t
does not have enough space, it will attempt to reallocate memory. If reallocation fails, fewer bytes may be appended than requested.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples