From 116ddaaae9267d9f89f3d127cba62763246b441c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 16 Sep 2007 22:42:03 +0000 Subject: 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 --- src/pulse/cdecl.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/pulse/cdecl.h') diff --git a/src/pulse/cdecl.h b/src/pulse/cdecl.h index 922ad276..e1f23d25 100644 --- a/src/pulse/cdecl.h +++ b/src/pulse/cdecl.h @@ -41,4 +41,22 @@ #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 -- cgit