From 751d6c55d37bf6485427080e9884ab22291b66f0 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 30 Apr 2006 11:47:05 +0200 Subject: [PATCH] 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. --- lib/conf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.39.2