]> git.sesse.net Git - vlc/commit
Allocate each object variable separately
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 30 Dec 2009 15:01:29 +0000 (17:01 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 30 Dec 2009 15:15:43 +0000 (17:15 +0200)
commitedecf92c8f8c28f3145ede090cdb20294c975d32
treecd27c089ccf526d3e0011c2002ca92a9b56b263b
parent8e3df82b7c1cf1ba08fbaf15f46af8b741781647
Allocate each object variable separately

This reduces the amount of memory copied when creating/deleting a
variable on an object. We now use a table of pointers instead of table
of variable_t.

This also simplifies callback handling a bit as the variable_t cannot
move anymore while we wait. Earlier another thread could add or remove
another variable on the same object, thus changing the variable table.

With this change, we could also store non-serialized data (i.e.
non-movable with memcpy/memmove) directly inside variable_t.
src/libvlc.h
src/misc/objects.c
src/misc/variables.c