pod: move vararg macros to separate file

This commit is contained in:
Wim Taymans 2019-01-25 16:17:29 +01:00
parent 7a8412e81a
commit 68bcc6b8e8
6 changed files with 111 additions and 60 deletions

View file

@ -106,6 +106,13 @@ struct spa_fraction {
SPA_MIN(SPA_MAX(_v, _low), _high); \
})
#define SPA_TYPECHECK(type,x) \
({ type __dummy; \
typeof(x) __dummy2; \
(void)(&__dummy == &__dummy2); \
x; \
})
#define SPA_MEMBER(b,o,t) ((t*)((uint8_t*)(b) + (int)(o)))
#define SPA_CONTAINER_OF(p,t,m) (t*)((uint8_t*)p - offsetof (t,m))