** Copy 'size' bytes from 'src' to 'dest', correcting endianness if ** given 'islittle' is different from native endianness. */
| 1536 | ** given 'islittle' is different from native endianness. |
| 1537 | */ |
| 1538 | static void copywithendian (volatile char *dest, volatile const char *src, |
| 1539 | int size, int islittle) { |
| 1540 | if (islittle == nativeendian.little) { |
| 1541 | while (size-- != 0) |
| 1542 | *(dest++) = *(src++); |
| 1543 | } |
| 1544 | else { |
| 1545 | dest += size - 1; |
| 1546 | while (size-- != 0) |
| 1547 | *(dest--) = *(src++); |
| 1548 | } |
| 1549 | } |
| 1550 | |
| 1551 | |
| 1552 | static int str_pack (lua_State *L) { |
no outgoing calls
no test coverage detected