Re: [PATCH] CodingStyle: add typedefs chapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Torvalds wrote:

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).

isn't it possible to mix up u32 and some random other thing?

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.

nack. something is a standard or something is not. black or white. grey isn't there.
of course, you are free to create your own kernel standard or whatever.
what about __uint32_t? *scnr*

marcel


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

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux