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

Function dumpSize

extlibs/lua/src/ldump.c:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59#define DIBS ((sizeof(size_t) * 8 / 7) + 1)
60
61static void dumpSize (DumpState *D, size_t x) {
62 lu_byte buff[DIBS];
63 int n = 0;
64 do {
65 buff[DIBS - (++n)] = x & 0x7f; /* fill buffer in reverse order */
66 x >>= 7;
67 } while (x != 0);
68 buff[DIBS - 1] |= 0x80; /* mark last byte */
69 dumpVector(D, buff + DIBS - n, n);
70}
71
72
73static void dumpInt (DumpState *D, int x) {

Callers 2

dumpIntFunction · 0.85
dumpStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected