mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
macro: add macro to align variables
This commit is contained in:
parent
59070892ed
commit
27bfb7628c
1 changed files with 6 additions and 0 deletions
|
|
@ -80,6 +80,12 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
|
|||
|
||||
#define PA_ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define PA_DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n)))
|
||||
#else
|
||||
#define PA_DECLARE_ALIGNED(n,t,v) t v
|
||||
#endif
|
||||
|
||||
/* The users of PA_MIN and PA_MAX, PA_CLAMP, PA_ROUND_UP should be
|
||||
* aware that these macros on non-GCC executed code with side effects
|
||||
* twice. It is thus considered misuse to use code with side effects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue