s/Preferred/Prefer/g suggested by kazuho++

This commit is contained in:
Tokuhiro Matsuno 2009-07-02 14:29:49 +09:00
parent 601209c83c
commit 7b198d5966
3 changed files with 3 additions and 3 deletions

View File

@ -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).

View File

@ -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;

View File

@ -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++];
} }