ruby-changes:28077
From: akr <ko1@a...>
Date: Fri, 5 Apr 2013 21:06:47 +0900 (JST)
Subject: [ruby-changes:28077] akr:r40129 (trunk): update comments.
akr 2013-04-05 21:06:34 +0900 (Fri, 05 Apr 2013) New Revision: 40129 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40129 Log: update comments. Modified files: trunk/pack.c Index: pack.c =================================================================== --- pack.c (revision 40128) +++ pack.c (revision 40129) @@ -675,62 +675,62 @@ pack_pack(VALUE ary, VALUE fmt) https://github.com/ruby/ruby/blob/trunk/pack.c#L675 } break; - case 's': /* signed short */ + case 's': /* s for int16_t, s! for signed short */ integer_size = NATINT_LEN(short, 2); bigendian_p = BIGENDIAN_P(); goto pack_integer; - case 'S': /* unsigned short */ + case 'S': /* S for uint16_t, S! for unsigned short */ integer_size = NATINT_LEN(short, 2); bigendian_p = BIGENDIAN_P(); goto pack_integer; - case 'i': /* signed int */ + case 'i': /* i and i! for signed int */ integer_size = (int)sizeof(int); bigendian_p = BIGENDIAN_P(); goto pack_integer; - case 'I': /* unsigned int */ + case 'I': /* I and I! for unsigned int */ integer_size = (int)sizeof(int); bigendian_p = BIGENDIAN_P(); goto pack_integer; - case 'l': /* signed long */ + case 'l': /* l for int32_t, l! for signed long */ integer_size = NATINT_LEN(long, 4); bigendian_p = BIGENDIAN_P(); goto pack_integer; - case 'L': /* unsigned long */ + case 'L': /* L for uint32_t, L! for unsigned long */ integer_size = NATINT_LEN(long, 4); bigendian_p = BIGENDIAN_P(); 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; bigendian_p = BIGENDIAN_P(); 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; bigendian_p = BIGENDIAN_P(); goto pack_integer; - case 'n': /* unsigned short (network byte-order) */ + case 'n': /* 16 bit (2 bytes) integer (network byte-order) */ integer_size = 2; bigendian_p = 1; goto pack_integer; - case 'N': /* unsigned long (network byte-order) */ + case 'N': /* 32 bit (4 bytes) integer (network byte-order) */ integer_size = 4; bigendian_p = 1; goto pack_integer; - case 'v': /* unsigned short (VAX byte-order) */ + case 'v': /* 16 bit (2 bytes) integer (VAX byte-order) */ integer_size = 2; bigendian_p = 0; goto pack_integer; - case 'V': /* unsigned long (VAX byte-order) */ + case 'V': /* 32 bit (4 bytes) integer (VAX byte-order) */ integer_size = 4; bigendian_p = 0; goto pack_integer; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/