[vorbis-dev] longs

Monty xiphmont at fireball.mit.edu
Mon Sep 11 14:41:21 PDT 2000



> Why not typedef something like UInt32/SInt32 so you get exactly what you 
> want on any platform?

Then you shoot yourself in the foot on any platform where that size is not most
efficient.  What I was thinking was a type that meant 'equal to or greater than
word width n'.  Ogg doesn;t need 32 bits for long, it need *at least* 32 bits.
This is a subtle difference from your suggestion, but an extremely important
one.

> Personally, I think it's better to never use native C data types directly 
> as their size is not constant. The problem you ran into is a good example 
> of why typedefs should be used instead.

C is the way it is for a reason, even if the decided upon spec turned out to be
'not entirely sufficient'.  Forcing an Alpha to use 32 bit ints, for example,
is a good way to kill integer performace (as Windows NT for Alpha partially
demostrates).

Monty

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list