Tweak the initialization in CREATE() to work around gcc deficiencies

This commit is contained in:
david parsons
2011-01-13 09:47:51 -08:00
parent 6544b62e5b
commit 9a8436fcbf
+1 -1
View File
@@ -18,7 +18,7 @@
*/
#define STRING(type) struct { type *text; int size, alloc; }
#define CREATE(x) T(x) = (void*)(S(x) = (x).alloc = 0)
#define CREATE(x) ( (T(x) = (void*)0), (S(x) = (x).alloc = 0) )
#define EXPAND(x) (S(x)++)[(S(x) < (x).alloc) \
? (T(x)) \
: (T(x) = T(x) ? realloc(T(x), sizeof T(x)[0] * ((x).alloc += 100)) \