MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / copywithendian

Function copywithendian

src/Chain/libraries/glua/lstrlib.cpp:1348–1359  ·  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

1346** given 'islittle' is different from native endianness.
1347*/
1348static void copywithendian(volatile char *dest, volatile const char *src,
1349 int size, int islittle) {
1350 if (islittle == nativeendian.little) {
1351 while (size-- != 0)
1352 *(dest++) = *(src++);
1353 }
1354 else {
1355 dest += size - 1;
1356 while (size-- != 0)
1357 *(dest--) = *(src++);
1358 }
1359}
1360
1361
1362static 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