mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-20 06:59:58 -05:00
pod: move vararg macros to separate file
This commit is contained in:
parent
7a8412e81a
commit
68bcc6b8e8
6 changed files with 111 additions and 60 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue