ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/CBOR-XS/XS.xs
(Generate patch)

Comparing CBOR-XS/XS.xs (file contents):
Revision 1.42 by root, Tue Dec 10 15:31:40 2013 UTC vs.
Revision 1.43 by root, Sun Jan 5 14:24:54 2014 UTC

736{ 736{
737 // for speed reasons, we specialcase single-string 737 // for speed reasons, we specialcase single-string
738 // byte or utf-8 strings as keys, but only when !stringref 738 // byte or utf-8 strings as keys, but only when !stringref
739 739
740 if (ecb_expect_true (!dec->stringref)) 740 if (ecb_expect_true (!dec->stringref))
741 if (ecb_expect_true ((*dec->cur - MAJOR_BYTES) <= LENGTH_EXT8)) 741 if (ecb_expect_true ((U8)(*dec->cur - MAJOR_BYTES) <= LENGTH_EXT8))
742 { 742 {
743 I32 len = decode_uint (dec); 743 I32 len = decode_uint (dec);
744 char *key = (char *)dec->cur; 744 char *key = (char *)dec->cur;
745 745
746 dec->cur += len; 746 dec->cur += len;
747 747
748 hv_store (hv, key, len, decode_sv (dec), 0); 748 hv_store (hv, key, len, decode_sv (dec), 0);
749 749
750 return; 750 return;
751 } 751 }
752 else if (ecb_expect_true ((*dec->cur - MAJOR_TEXT) <= LENGTH_EXT8)) 752 else if (ecb_expect_true ((U8)(*dec->cur - MAJOR_TEXT) <= LENGTH_EXT8))
753 { 753 {
754 I32 len = decode_uint (dec); 754 I32 len = decode_uint (dec);
755 char *key = (char *)dec->cur; 755 char *key = (char *)dec->cur;
756 756
757 dec->cur += len; 757 dec->cur += len;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines