MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / copywithendian

Function copywithendian

extlibs/lua/src/lstrlib.c:1538–1549  ·  view source on GitHub ↗

** Copy 'size' bytes from 'src' to 'dest', correcting endianness if ** given 'islittle' is different from native endianness. */

Source from the content-addressed store, hash-verified

1536** given 'islittle' is different from native endianness.
1537*/
1538static 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
1552static int str_pack (lua_State *L) {

Callers 2

str_packFunction · 0.85
str_unpackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected