Revision: | 1.2 |
Committed: | Sun Sep 3 23:33:01 2006 UTC (17 years, 8 months ago) by root |
Content type: | text/plain |
Branch: | MAIN |
Changes since 1.1: | +6 -0 lines |
Log Message: | use alternative shstr representation, might or might not be faster, but does save code |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.1 | #ifndef UTIL_H__ |
2 | #define UTIL_H__ | ||
3 | |||
4 | root | 1.2 | #if __GNUC__ >= 3 |
5 | # define is_constant(c) __builtin_constant_p (c) | ||
6 | #else | ||
7 | # define is_constant(c) 0 | ||
8 | #endif | ||
9 | |||
10 | root | 1.1 | // makes dynamically allocated objects zero-initialised |
11 | struct zero_initialised | ||
12 | { | ||
13 | void *operator new (size_t s); | ||
14 | void operator delete (void *p, size_t s); | ||
15 | }; | ||
16 | |||
17 | #endif | ||
18 |