yev_set_gbuffer()

yev_set_gbuffer()#

yev_set_gbuffer() associates a gbuffer_t * with a given yev_event_h. If a previous buffer exists, it is freed before setting the new one.

Prototype

int yev_set_gbuffer(
    yev_event_h  yev_event,
    gbuffer_t   *gbuf
);

Parameters

Key

Type

Description

yev_event

yev_event_h

The event handle to which the buffer will be assigned.

gbuf

gbuffer_t *

The buffer to associate with the event. If NULL, the current buffer is reset.


Return Value

Returns 0 on success, or -1 if an error occurs.

Notes

This function is only applicable for events created using yev_create_read_event() and yev_create_write_event().

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples