rubinius/rapa — pull request #3 by cheba (2012-01-15 01:34:26+00:00)
Title: Byte order flags (<>)

This is initial implementation of byte order flags. Currently only unpack version implemented.

I've tried a few simple test and it seems to work. Haven't tried running Rubyspec with it.

As you can see, byte order is saved in a variable that can hold three possible values.
* 0 for default (platform) byte order
* 1 for big-endian
* 2 for little-endian

Every SILQ action handles it with switch. It doesn't look pretty to me but I'm afraid my C++ skills are limited.