blob: d8ca081deebe680f99f25734c910b40718736f4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "rfbbuffer.h"
RfbBuffer *
rfb_buffer_new (void)
{
return g_new0 (RfbBuffer, 1);
}
RfbBuffer *
rfb_buffer_new_and_alloc (int len)
{
RfbBuffer *buffer = g_new0 (RfbBuffer, 1);
buffer->data = g_malloc (len);
buffer->free_data = (RfbBufferFreeFunc) g_free;
return buffer;
}
void
rfb_buffer_free (RfbBuffer * buffer)
{
g_return_if_fail (buffer != NULL);
buffer->free_data (buffer->data, buffer->buffer_private);
}
|