]> git.decadent.org.uk Git - ion3.git/blob - ioncore/gr-util.h
52cf3846a1a6aab5f074f3c97254398e7e595ac5
[ion3.git] / ioncore / gr-util.h
1 /*
2  * ion/ioncore/gr-util.h
3  *
4  * Copyright (c) Tuomo Valkonen 2007. 
5  *
6  * Ion is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  */
11
12 #ifndef ION_IONCORE_GR_UTIL_H
13 #define ION_IONCORE_GR_UTIL_H
14
15 #include "gr.h"
16
17 #define GR_ATTR(X) grattr_##X
18 #define GR_DEFATTR(X) static GrAttr GR_ATTR(X) = STRINGID_NONE
19 #define GR_ALLOCATTR_BEGIN static bool alloced=FALSE; if(alloced) return
20 #define GR_ALLOCATTR_END alloced=TRUE
21 #define GR_ALLOCATTR(X) GR_ATTR(X) = stringstore_alloc(#X)
22
23 #endif /* ION_IONCORE_GR_UTIL_H */
24