2 * ion/ioncore/gr-util.h
4 * Copyright (c) Tuomo Valkonen 2007-2009.
6 * See the included file LICENSE for details.
9 #ifndef ION_IONCORE_GR_UTIL_H
10 #define ION_IONCORE_GR_UTIL_H
14 #define GR_ATTR(X) grattr_##X
15 #define GR_DEFATTR(X) static GrAttr GR_ATTR(X) = STRINGID_NONE
16 #define GR_ALLOCATTR_BEGIN static bool alloced=FALSE; if(alloced) return
17 #define GR_ALLOCATTR_END alloced=TRUE
18 #define GR_ALLOCATTR(X) GR_ATTR(X) = stringstore_alloc(#X)
20 #endif /* ION_IONCORE_GR_UTIL_H */