Re: Newbie idiotic questions.

Daniel Phillips (phillips@bonn-fries.net)
Sun, 17 Jun 2001 23:28:34 +0200


On Sunday 17 June 2001 22:37, Alexander Viro wrote:
> On Sun, 17 Jun 2001, Daniel Phillips wrote:
> > Well, since we are still beating this one to death, I'd written a "knew"
> > macro as well, and put it aside. It does the assignment for you too:
> >
> > #define knew(p) ((p) = (typeof(p)) kmalloc(sizeof(*(p)), GFP_KERNEL))
> >
> > Terse and clear at the same time, and type safe. I still don't like it
> > much.
>
> And ungreppable, not to mention gratitious use of GNU extension.

typeof? It's rather popular in the kernel already. Besides, who is going to
compile this with anything other than gcc?

I don't see your point about greppability.

--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/