Handling endianness in Tango's FileConduit
a at a.a
Wed Oct 8 15:15:50 PDT 2008
> Nick Sabalausky wrote:
>> 1. Rename "EndianProtocol" to "EndianSwitchProtocol" to make it's
>> behavior more clear. Possibly make it internal to Tango.
>> 2. Create a new "EndianProtocol" that takes an "Endianness" enum of
>> "LittleEndian" or "BigEndian" (and maybe also "SwitchEndian" and
>> "NativeEndian") as a ctor parameter, checks the native endianness, and
>> appropriately adds or doesn't add the "EndianSwitchProtocol" (or just
>> does the byte-order swapping itself instead of using
> Please create a ticket for that!
>> In any case, it looks like step 2 is something I'd currently have to
>> implement myself. Does Tango provide a way to detect the system's
> Tango doesn't, but D does with version(BigEndian) or
*Smacks forehead* I knew that, and managed to forget :) That was one of the
early things that first impressd me about D.
> Also, if you implement it yourself, you can as well contribute it to
> Tango, so other people don't have the same problem. :) You can also add a
> patch/code to the ticket. Would be awesome.
Good idea. Done:
> Kind regards, Alex
More information about the Digitalmars-d-learn