This project is closed and read-only.
Backport #3297 » array_pack.patch
| ./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;
|
||