class library: SynthDef - lazy implementation of removeUGen
[supercollider.git] / include / common / function_attributes.h
blob10b7dc9cd489b23df5d5ddb940bb380dbf3b0868
1 /*
2 SuperCollider real time audio synthesis system
3 Copyright (c) 2011 Tim Blechmann. All rights reserved.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef FUNCTION_ATTRIBUTES_H
21 #define FUNCTION_ATTRIBUTES_H
23 #ifdef __GNUC__
25 #define CONST __attribute__((const))
26 #define PURE __attribute__((pure))
27 #define MALLOC __attribute__((malloc))
28 #define HOT __attribute__((hot))
29 #define COLD __attribute__((cold))
30 #define FLATTEN __attribute__((flatten))
32 #endif
34 #ifdef __clang__
35 #undef HOT
36 #undef FLATTEN
38 #define HOT /*HOT*/
39 #define FLATTEN /*FLATTEN*/
40 #endif
42 #ifdef __PATHCC__
43 #undef HOT
44 #undef FLATTEN
46 #define HOT /*HOT*/
47 #define FLATTEN /*FLATTEN*/
48 #endif
51 #ifndef PURE
52 #define PURE /*PURE*/
53 #endif
55 #ifndef CONST
56 #define CONST /*CONST*/
57 #endif
59 #ifndef MALLOC
60 #define MALLOC /*MALLOC*/
61 #endif
63 #ifndef HOT
64 #define HOT /*HOT*/
65 #endif
67 #ifndef COLD
68 #define COLD /*COLD*/
69 #endif
71 #endif /* FUNCTION_ATTRIBUTES_H */