array: update size on delete

This commit is contained in:
Wim Taymans 2018-07-07 11:29:45 +02:00
parent 2ac2822d4f
commit e0676fcef8

View file

@ -63,8 +63,9 @@ struct pw_array {
(pos)++)
#define pw_array_remove(a,p) \
(a)->size -= sizeof(*(p)); \
memmove(p, SPA_MEMBER((p), sizeof(*(p)), void), \
SPA_PTRDIFF((p), pw_array_end(a)) - sizeof(*(p)));
SPA_PTRDIFF(pw_array_end(a),(p)));
/** Initialize the array with given extend \memberof pw_array */