]> mj.ucw.cz Git - libucw.git/commitdiff
Replaced the DARY_ALLOC by a comment explaining when it doesn't work.
authorMartin Mares <mj@ucw.cz>
Sun, 30 Apr 2006 09:47:05 +0000 (11:47 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 30 Apr 2006 09:47:05 +0000 (11:47 +0200)
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.

lib/conf.h

index eac0ad84f345c1674996fde81c7d661388102dda..beb4c449583d4f2553c48eed4ef0b1435dddab70 100644 (file)
@@ -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;