buffer: allow building into custom memory

Make it possible to pass custom memory to the builder so that it can
construct packets directly into specified memory and avoid allocs.
Remove GError and GSocketControlMessage in the buffer API to make it
possible to use other (rt-safe) API later.
This commit is contained in:
Wim Taymans 2016-05-09 18:48:18 +02:00
parent 91385a782e
commit c67d3d7f04
9 changed files with 240 additions and 175 deletions

View file

@ -63,10 +63,14 @@ typedef struct {
} PinosStackHeader;
typedef struct {
gsize allocated_size;
gsize size;
gpointer data;
GSocketControlMessage *message;
gsize size;
gsize max_size;
gpointer free_data;
gint *fds;
gint n_fds;
gint max_fds;
gpointer free_fds;
gsize magic;
} PinosStackBuffer;