lkml.org 
[lkml]   [2006]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] CodingStyle: add typedefs chapter


On Tue, 2 May 2006, David Woodhouse wrote:
>
> On Tue, 2006-05-02 at 11:41 -0700, Linus Torvalds wrote:
> > The problem with uint32_t is that it's ugly, it used to be unportable, and
> > you can't use it in header files _anyway_.
>
> Unportable? It's at least as portable as u32 is, surely? We probably
> wouldn't have used <stdint.h> in the kernel anyway -- we define them
> ourselves.

When the u<n> things were done, uint<n>_t wasn't at all common.

> The header files are completely irrelevant too -- we're talking about
> 'u32' not '__u32'.

That's not irrelevant. Usually you want to have stuff in header files that
you use in source code. You want the two to visually look similar. It's a
hell of a lot less confusing to use "u32" (in source) and "__u32" (in the
header file), than it is to mix "uint32_t" (in source) and some random
other thing (in header file).

> The important thing is your belief that it's ugly, which is what was
> documented.

And that wasn't what I objected to.

What I objected to was that other part, which said that "uint32_t" was
somehow more standard.

IN THE KERNEL IT IS _LESS_ STANDARD.

And outside the kernel, that documentation is not exactly relevant.

Linus
-
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/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.097 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site