5#ifndef SPA_POD_DYNAMIC_H
6#define SPA_POD_DYNAMIC_H
21static int spa_pod_dynamic_builder_overflow(
void *
data, uint32_t
size)
24 int32_t old_size = d->
b.
size;
26 void *old_data = d->
b.
data;
28 if (old_data == d->
data)
30 if ((d->
b.
data = realloc(d->
b.
data, new_size)) == NULL)
32 if (old_data == d->
data && d->
b.
data != old_data && old_size > 0)
33 memcpy(d->
b.
data, old_data, old_size);
43 .overflow = spa_pod_dynamic_builder_overflow
54 free(builder->
b.
data);
static void spa_pod_builder_set_callbacks(struct spa_pod_builder *builder, const struct spa_pod_builder_callbacks *callbacks, void *data)
Definition: builder.h:71
#define SPA_POD_BUILDER_INIT(buffer, size)
Definition: builder.h:62
#define SPA_VERSION_POD_BUILDER_CALLBACKS
Definition: builder.h:47
#define SPA_ROUND_UP_N(num, align)
Definition: defs.h:320
void * data
Definition: builder.h:54
uint32_t size
Definition: builder.h:55
uint32_t extend
Definition: dynamic.h:21
uint32_t _padding
Definition: dynamic.h:22
struct spa_pod_builder b
Definition: dynamic.h:19
void * data
Definition: dynamic.h:20