MCPcopy Create free account
hub / github.com/WebAssembly/wasm-c-api / encode_size32

Function encode_size32

src/wasm-bin.cc:44–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void encode_size32(char*& ptr, size_t n) {
45 assert(n <= 0xffffffff);
46 for (int i = 0; i < 5; ++i) {
47 *ptr++ = (n & 0x7f) | (i == 4 ? 0x00 : 0x80);
48 n = n >> 7;
49 }
50}
51
52
53void encode_valtype(char*& ptr, const ValType* type) {

Callers 1

wrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected