[Python-3000] struni and the Apple four-character-codes
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Jul 26 04:07:55 CEST 2007
Jeffrey Yasskin wrote:
> Apple, around the dawn of time, decided
> that C constants like 'TEXT' (yes, those are single quotes) would
> compile to the uint32_t 0x54455854
They weren't C constants originally, they were Pascal
constants, and it made sense at the time given the way
the Pascal compiler they were using handled string
literals. They also worked okay as multi-character char
literals in the early C compilers used on the Mac.
It's unfortunate that gcc gets persnickety about those.
> I initially thought that 'bytes'
> was the appropriate type. Unfortunately, bytes is mutable, and I think
> it makes sense to hash these constants (and some code in aepack.py
> does).
Is this another indication that we should have an
immutable version of the bytes type?
--
Greg
More information about the Python-3000
mailing list