gbuffer_setlabel()#
Sets the label of the given gbuffer_t *. If a label already exists, it is freed before assigning the new one.
Prototype
int gbuffer_setlabel(
gbuffer_t *gbuf,
const char *label
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Pointer to the |
|
|
New label string to assign. If |
Return Value
Returns 0 on success. If gbuf is NULL, an error is logged and -1 is returned.
Notes
If a label is already set, it is freed before assigning the new one. The function duplicates the input string to ensure memory safety.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples