mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
Tweak the initialization in CREATE() to work around gcc deficiencies
This commit is contained in:
@@ -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)) \
|
||||
|
||||
Reference in New Issue
Block a user