MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / append_tuple_header

Method append_tuple_header

src/dpp/etf.cpp:184–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void etf_parser::append_tuple_header(etf_buffer *b, size_t size) {
185 if (size < 256) {
186 unsigned char buf[2];
187 buf[0] = ett_small_tuple;
188 buf[1] = (unsigned char)size;
189 buffer_write(b, (const char *)buf, 2);
190 } else {
191 unsigned char buf[5];
192 buf[0] = ett_large_tuple;
193 store_32_bits(buf + 1, size);
194 buffer_write(b, (const char *)buf, 5);
195 }
196}
197
198void etf_parser::append_nil_ext(etf_buffer *b) {
199 static unsigned char buf[1] = {ett_nil};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected