ucx/buffer.h

changeset 61
fb07a0ab9a17
parent 60
abae4669fba7
child 62
6814aea8462d
equal deleted inserted replaced
60:abae4669fba7 61:fb07a0ab9a17
5 5
6 #ifdef __cplusplus 6 #ifdef __cplusplus
7 extern "C" { 7 extern "C" {
8 #endif 8 #endif
9 9
10 #define UCX_BUFFER_DEFAULT 0x00
11 #define UCX_BUFFER_AUTOFREE 0x01
10 12
11 /* the user shall not modify values */ 13 /* the user shall not modify values */
12 typedef struct UcxBuffer UcxBuffer; 14 typedef struct UcxBuffer UcxBuffer;
13 15
14 UcxBuffer *ucx_buffer_new(void *space, size_t length); 16 /* if space is NULL, new space is allocated and the autofree flag is enforced */
17 UcxBuffer *ucx_buffer_new(void *space, size_t length, int flags);
15 void ucx_buffer_free(UcxBuffer* buffer); 18 void ucx_buffer_free(UcxBuffer* buffer);
16 19
17 /* 20 /*
18 * Moves the position of the buffer to a new position relative to whence. 21 * Moves the position of the buffer to a new position relative to whence.
19 * 22 *

mercurial