mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-21 23:56:55 +02:00
SVs with POK and IOK/NOK should be packed as numbers, not strings
This commit is contained in:
@@ -211,6 +211,9 @@ sub _pack {
|
||||
}
|
||||
|
||||
}
|
||||
elsif ( $flags & ( B::SVf_NOK | B::SVp_NOK ) ) { # double only
|
||||
return pack_double( $value );
|
||||
}
|
||||
elsif ( $flags & B::SVf_POK ) { # raw / check needs before dboule
|
||||
|
||||
if ( $Data::MessagePack::PreferInteger ) {
|
||||
@@ -242,9 +245,6 @@ sub _pack {
|
||||
return $header . $value;
|
||||
|
||||
}
|
||||
elsif ( $flags & ( B::SVf_NOK | B::SVp_NOK ) ) { # double only
|
||||
return pack_double( $value );
|
||||
}
|
||||
else {
|
||||
_unexpected("data type %s", $b_obj);
|
||||
}
|
||||
|
Reference in New Issue
Block a user