X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fgr-util.h;fp=ioncore%2Fgr-util.h;h=52cf3846a1a6aab5f074f3c97254398e7e595ac5;hp=0000000000000000000000000000000000000000;hb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/ioncore/gr-util.h b/ioncore/gr-util.h new file mode 100644 index 0000000..52cf384 --- /dev/null +++ b/ioncore/gr-util.h @@ -0,0 +1,24 @@ +/* + * ion/ioncore/gr-util.h + * + * Copyright (c) Tuomo Valkonen 2007. + * + * Ion is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + */ + +#ifndef ION_IONCORE_GR_UTIL_H +#define ION_IONCORE_GR_UTIL_H + +#include "gr.h" + +#define GR_ATTR(X) grattr_##X +#define GR_DEFATTR(X) static GrAttr GR_ATTR(X) = STRINGID_NONE +#define GR_ALLOCATTR_BEGIN static bool alloced=FALSE; if(alloced) return +#define GR_ALLOCATTR_END alloced=TRUE +#define GR_ALLOCATTR(X) GR_ATTR(X) = stringstore_alloc(#X) + +#endif /* ION_IONCORE_GR_UTIL_H */ +