[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080124225040.GC1975@martell.zuzino.mipt.ru>
Date: Fri, 25 Jan 2008 01:50:40 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: Stefan Richter <stefanr@...6.in-berlin.de>,
Randy Dunlap <randy.dunlap@...cle.com>,
akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org
Subject: Re: [patch 07/26] Add INIT_ARRAY() to kernel.h (update 2)
On Thu, Jan 24, 2008 at 05:10:54PM -0500, Mathieu Desnoyers wrote:
> Array initializers in the body of a function causes unbalanced brackets which
> syntax highlighting editors such as vim have problems with. Fix this by creating
> the INIT_ARRAY() macro.
>
> It is used to declare arguments passed as function parameters such as:
> text_poke(addr, INIT_ARRAY(unsigned char, 0xf0, len), len);
> +#define INIT_ARRAY(type, val, len) ((type[]) {[0 ... (len)-1] = (val)})
While we are at useless macro territory, let's name it MAKE_ARRAY because
it's exactly what it does.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists