types: remap ids

Remap ids between client and server
This commit is contained in:
Wim Taymans 2017-04-17 19:36:22 +02:00
parent be528ba7c2
commit c7333c46cc
10 changed files with 82 additions and 3 deletions

View file

@ -53,6 +53,9 @@ struct _PinosMap {
#define pinos_map_has_item(m,id) (pinos_map_check_id(m,id) && !pinos_map_id_is_free(m, id))
#define pinos_map_lookup_unchecked(m,id) pinos_map_get_item(m,id)->data
#define PINOS_MAP_ID_TO_PTR(id) (SPA_UINT32_TO_PTR((id)<<1))
#define PINOS_MAP_PTR_TO_ID(p) (SPA_PTR_TO_UINT32(p)>>1)
static inline void
pinos_map_init (PinosMap *map,
size_t size,