mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-01 09:24:51 +02:00
s/Preferred/Prefer/g suggested by kazuho++
This commit is contained in:
parent
601209c83c
commit
7b198d5966
@ -28,7 +28,7 @@ Data::MessagePack is a binary packer for perl.
|
|||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
|
||||||
=item $Data::MessagePack::PreferredInteger
|
=item $Data::MessagePack::PreferInteger
|
||||||
|
|
||||||
Pack the string as int when the value looks like int(EXPERIMENTAL).
|
Pack the string as int when the value looks like int(EXPERIMENTAL).
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ static void _msgpack_pack_sv(enc_t *enc, SV* val) {
|
|||||||
STRLEN len;
|
STRLEN len;
|
||||||
char * cval = SvPV(val, len);
|
char * cval = SvPV(val, len);
|
||||||
|
|
||||||
SV* pref_int = get_sv("Data::MessagePack::PreferredInteger", 0);
|
SV* pref_int = get_sv("Data::MessagePack::PreferInteger", 0);
|
||||||
if (pref_int && SvTRUE(pref_int) && looks_like_int(cval, len) && SvUV(val) < U32_MAX) {
|
if (pref_int && SvTRUE(pref_int) && looks_like_int(cval, len) && SvUV(val) < U32_MAX) {
|
||||||
PACK_WRAPPER(uint32)(enc, SvUV(val));
|
PACK_WRAPPER(uint32)(enc, SvUV(val));
|
||||||
return;
|
return;
|
||||||
|
@ -31,7 +31,7 @@ my @dat = (
|
|||||||
);
|
);
|
||||||
plan tests => 1*(scalar(@dat)/2);
|
plan tests => 1*(scalar(@dat)/2);
|
||||||
|
|
||||||
$Data::MessagePack::PreferredInteger = 1;
|
$Data::MessagePack::PreferInteger = 1;
|
||||||
for (my $i=0; $i<scalar(@dat); ) {
|
for (my $i=0; $i<scalar(@dat); ) {
|
||||||
pis $dat[$i++], $dat[$i++];
|
pis $dat[$i++], $dat[$i++];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user