use gcc const and pure function attributes wherever applicable

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1835 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-09-16 22:42:03 +00:00
parent 35483eeab7
commit 116ddaaae9
10 changed files with 73 additions and 36 deletions

View file

@ -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