MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / dumpSize

Function dumpSize

lib/lua/src/ldump.c:65–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

dumpIntFunction · 0.85
dumpStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected