2 * ion/ioncore/gr-util.h
4 * Copyright (c) Tuomo Valkonen 2007.
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.
12 #ifndef ION_IONCORE_GR_UTIL_H
13 #define ION_IONCORE_GR_UTIL_H
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)
23 #endif /* ION_IONCORE_GR_UTIL_H */