Project

General

Profile

Backport #3297 » array_pack.patch

kkaempf (Klaus Kämpf), 05/15/2010 04:10 AM

View differences:

./pack.c 2010-05-14 13:15:53.000000000 +0200
case 'i': /* signed int */
case 'I': /* unsigned int */
while (len-- > 0) {
#if WORDS_BIGENDIAN && SIZEOF_LONG == 8
int i;
#else
long i;
#endif
from = NEXTFROM;
i = num2i32(from);
#if WORDS_BIGENDIAN && SIZEOF_LONG == 8
rb_str_buf_cat(res, &i, NATINT_LEN(int,4));
#else
rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
#endif
}
break;
    (1-1/1)