diff options
Diffstat (limited to 'src/pulsecore/gccmacro.h')
-rw-r--r-- | src/pulsecore/gccmacro.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/pulsecore/gccmacro.h b/src/pulsecore/gccmacro.h index f3ace593..d211c2e7 100644 --- a/src/pulsecore/gccmacro.h +++ b/src/pulsecore/gccmacro.h @@ -55,7 +55,26 @@ #ifdef __GNUC__ #define PA_GCC_DESTRUCTOR __attribute__ ((destructor)) #else +/** Call this function when process terminates */ #define PA_GCC_DESTRUCTOR #endif +#ifndef PA_GCC_PURE +#ifdef __GNUCC__ +#define PA_GCC_PURE __attribute__ ((pure)) +#else +/** This function's return value depends only the arguments list and global state **/ +#define PA_GCC_PURE +#endif +#endif + +#ifndef PA_GCC_CONST +#ifdef __GNUCC__ +#define PA_GCC_CONST __attribute__ ((pure)) +#else +/** This function's return value depends only the arguments list (stricter version of PA_GCC_CONST) **/ +#define PA_GCC_CONST +#endif +#endif + #endif |