MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / correctbytes

Function correctbytes

deps/lua/src/lua_struct.c:196–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194
195
196static void correctbytes (char *b, int size, int endian) {
197 if (endian != native.endian) {
198 int i = 0;
199 while (i < --size) {
200 char temp = b[i];
201 b[i++] = b[size];
202 b[size] = temp;
203 }
204 }
205}
206
207
208static int b_pack (lua_State *L) {

Callers 2

b_packFunction · 0.85
b_unpackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected