Browse files

Add FFI::Platform::BYTE_ORDER

  • Loading branch information...
1 parent 9a091dd commit e9617292fe0033101c3c30a64b4a14e92c1bdf9d @DanielVartanov committed Dec 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 kernel/platform/ffi.rb
View
4 kernel/platform/ffi.rb
@@ -257,4 +257,8 @@ def self.mac?
def self.unix?
! windows?
end
+
+ LITTLE_ENDIAN = :little
+ BIG_ENDIAN = :big
+ BYTE_ORDER = Rubinius::ENDIAN == :little ? LITTLE_ENDIAN : BIG_ENDIAN
end

0 comments on commit e961729

Please sign in to comment.