зеркало из https://github.com/github/ruby.git
update comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e9382c7332
Коммит
5ec185c86b
24
pack.c
24
pack.c
|
@ -675,62 +675,62 @@ pack_pack(VALUE ary, VALUE fmt)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': /* signed short */
|
case 's': /* s for int16_t, s! for signed short */
|
||||||
integer_size = NATINT_LEN(short, 2);
|
integer_size = NATINT_LEN(short, 2);
|
||||||
bigendian_p = BIGENDIAN_P();
|
bigendian_p = BIGENDIAN_P();
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'S': /* unsigned short */
|
case 'S': /* S for uint16_t, S! for unsigned short */
|
||||||
integer_size = NATINT_LEN(short, 2);
|
integer_size = NATINT_LEN(short, 2);
|
||||||
bigendian_p = BIGENDIAN_P();
|
bigendian_p = BIGENDIAN_P();
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'i': /* signed int */
|
case 'i': /* i and i! for signed int */
|
||||||
integer_size = (int)sizeof(int);
|
integer_size = (int)sizeof(int);
|
||||||
bigendian_p = BIGENDIAN_P();
|
bigendian_p = BIGENDIAN_P();
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'I': /* unsigned int */
|
case 'I': /* I and I! for unsigned int */
|
||||||
integer_size = (int)sizeof(int);
|
integer_size = (int)sizeof(int);
|
||||||
bigendian_p = BIGENDIAN_P();
|
bigendian_p = BIGENDIAN_P();
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'l': /* signed long */
|
case 'l': /* l for int32_t, l! for signed long */
|
||||||
integer_size = NATINT_LEN(long, 4);
|
integer_size = NATINT_LEN(long, 4);
|
||||||
bigendian_p = BIGENDIAN_P();
|
bigendian_p = BIGENDIAN_P();
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'L': /* unsigned long */
|
case 'L': /* L for uint32_t, L! for unsigned long */
|
||||||
integer_size = NATINT_LEN(long, 4);
|
integer_size = NATINT_LEN(long, 4);
|
||||||
bigendian_p = BIGENDIAN_P();
|
bigendian_p = BIGENDIAN_P();
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'q': /* signed long long or int64_t */
|
case 'q': /* q for int64_t, q! for signed long long */
|
||||||
integer_size = NATINT_LEN_Q;
|
integer_size = NATINT_LEN_Q;
|
||||||
bigendian_p = BIGENDIAN_P();
|
bigendian_p = BIGENDIAN_P();
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'Q': /* unsigned long long or uint64_t */
|
case 'Q': /* Q for uint64_t, Q! for unsigned long long */
|
||||||
integer_size = NATINT_LEN_Q;
|
integer_size = NATINT_LEN_Q;
|
||||||
bigendian_p = BIGENDIAN_P();
|
bigendian_p = BIGENDIAN_P();
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'n': /* unsigned short (network byte-order) */
|
case 'n': /* 16 bit (2 bytes) integer (network byte-order) */
|
||||||
integer_size = 2;
|
integer_size = 2;
|
||||||
bigendian_p = 1;
|
bigendian_p = 1;
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'N': /* unsigned long (network byte-order) */
|
case 'N': /* 32 bit (4 bytes) integer (network byte-order) */
|
||||||
integer_size = 4;
|
integer_size = 4;
|
||||||
bigendian_p = 1;
|
bigendian_p = 1;
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'v': /* unsigned short (VAX byte-order) */
|
case 'v': /* 16 bit (2 bytes) integer (VAX byte-order) */
|
||||||
integer_size = 2;
|
integer_size = 2;
|
||||||
bigendian_p = 0;
|
bigendian_p = 0;
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
||||||
case 'V': /* unsigned long (VAX byte-order) */
|
case 'V': /* 32 bit (4 bytes) integer (VAX byte-order) */
|
||||||
integer_size = 4;
|
integer_size = 4;
|
||||||
bigendian_p = 0;
|
bigendian_p = 0;
|
||||||
goto pack_integer;
|
goto pack_integer;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче