From: Tanaka Akira Date: 2012-02-23T13:54:53+09:00 Subject: [ruby-core:42829] Re: [ruby-trunk - Feature #6065] Allow Bignum marshalling/unmarshalling from C API 2012/2/23 Tanaka Akira : > I think your proposal also rely on machine endianness because > it use "long" type. > > I guess bytes in long type (4 bytes or 8 bytes in usual) is > native endian. Am I wrong? Oops. [ruby-core:42813] describes "where each of the longs hemselves should probably be in the same order". I think unsigned long should be used only for native endian. unsigned char should be used instead for big- or little- endian data. -- Tanaka Akira