From: Martin Mares Date: Sun, 30 Apr 2006 09:47:05 +0000 (+0200) Subject: Replaced the DARY_ALLOC by a comment explaining when it doesn't work. X-Git-Tag: holmes-import~645^2~9 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=751d6c55d37bf6485427080e9884ab22291b66f0;p=libucw.git Replaced the DARY_ALLOC by a comment explaining when it doesn't work. I think that we no longer need to worry about this macro, because the only DARY initializations we needed so far were to an empty array and they are done automatically now. When the need arises, we can add a simple function for creating a DARY of a given length. --- diff --git a/lib/conf.h b/lib/conf.h index eac0ad84..beb4c449 100644 --- a/lib/conf.h +++ b/lib/conf.h @@ -132,8 +132,7 @@ struct cf_section { #define DARY_LEN(a) *(uns*)(a-1) // length of a dynamic array #define DARY_ALLOC(type,len,val...) (type[]) { (type)len, ##val } + 1 - // creates a static instance of a dynamic array - // FIXME: overcast doesn't work for the double type + // creates a static instance of a dynamic array, works only for integer and pointer types /* Memory allocation: conf-alloc.c */ struct mempool;