mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
added some comments in Data::MessagePack::PP
This commit is contained in:
parent
f91728561f
commit
b97baf4d47
1 changed files with 3 additions and 0 deletions
|
|
@ -22,7 +22,10 @@ use B ();
|
|||
BEGIN {
|
||||
# for pack and unpack compatibility
|
||||
if ( $] < 5.010 ) {
|
||||
# require $Config{byteorder}; my $bo_is_le = ( $Config{byteorder} =~ /^1234/ );
|
||||
# which better?
|
||||
my $bo_is_le = unpack ( 'd', "\x00\x00\x00\x00\x00\x00\xf0\x3f") == 1; # 1.0LE
|
||||
# In really, since 5.9.2 '>' is introduced.
|
||||
*pack_double = $bo_is_le ? sub {
|
||||
my @v = unpack( 'V2', pack( 'd', $_[0] ) );
|
||||
return pack 'CN2', 0xcb, @v[1,0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue