** Copy 'size' bytes from 'src' to 'dest', correcting endianness if ** given 'islittle' is different from native endianness. */
| 1314 | ** given 'islittle' is different from native endianness. |
| 1315 | */ |
| 1316 | static void copywithendian (volatile char *dest, volatile const char *src, |
| 1317 | int size, int islittle) { |
| 1318 | if (islittle == nativeendian.little) { |
| 1319 | while (size-- != 0) |
| 1320 | *(dest++) = *(src++); |
| 1321 | } |
| 1322 | else { |
| 1323 | dest += size - 1; |
| 1324 | while (size-- != 0) |
| 1325 | *(dest--) = *(src++); |
| 1326 | } |
| 1327 | } |
| 1328 | |
| 1329 | |
| 1330 | static int str_pack (lua_State *L) { |
no outgoing calls
no test coverage detected